LLDB mainline
ScriptedFrame.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_SCRIPTED_FRAME_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTED_FRAME_H
11
12#include "ScriptedThread.h"
16#include <string>
17
18namespace lldb_private {
19class ScriptedThread;
20}
21
22namespace lldb_private {
23
25
26public:
30 SymbolContext &sym_ctx, lldb::RegisterContextSP reg_ctx_sp,
31 std::shared_ptr<DynamicRegisterInfo> reg_info_sp,
32 StructuredData::GenericSP script_object_sp = nullptr);
33
34 ~ScriptedFrame() override;
35
36 static llvm::Expected<std::shared_ptr<ScriptedFrame>>
38 StructuredData::Generic *script_object = nullptr);
39
40 bool IsInlined() override;
41 bool IsArtificial() const override;
42 bool IsHidden() override;
43 const char *GetFunctionName() override;
44 const char *GetDisplayFunctionName() override;
45
46private:
49
50 ScriptedFrame(const ScriptedFrame &) = delete;
51 const ScriptedFrame &operator=(const ScriptedFrame &) = delete;
52
53 std::shared_ptr<DynamicRegisterInfo> GetDynamicRegisterInfo();
54
57 std::shared_ptr<DynamicRegisterInfo> m_register_info_sp;
58};
59
60} // namespace lldb_private
61
62#endif // LLDB_SOURCE_PLUGINS_SCRIPTED_FRAME_H
std::shared_ptr< DynamicRegisterInfo > m_register_info_sp
ScriptedFrame(ScriptedThread &thread, lldb::ScriptedFrameInterfaceSP interface_sp, lldb::user_id_t frame_idx, lldb::addr_t pc, SymbolContext &sym_ctx, lldb::RegisterContextSP reg_ctx_sp, std::shared_ptr< DynamicRegisterInfo > reg_info_sp, StructuredData::GenericSP script_object_sp=nullptr)
bool IsArtificial() const override
Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frame...
const char * GetFunctionName() override
Get the frame's demangled name.
lldb::ScriptedFrameInterfaceSP GetInterface() const
void CheckInterpreterAndScriptObject() const
lldb::ScriptedFrameInterfaceSP m_scripted_frame_interface_sp
static llvm::Expected< std::shared_ptr< ScriptedFrame > > Create(ScriptedThread &thread, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_object=nullptr)
ScriptedFrame(const ScriptedFrame &)=delete
const ScriptedFrame & operator=(const ScriptedFrame &)=delete
lldb_private::StructuredData::GenericSP m_script_object_sp
bool IsHidden() override
Query whether this frame should be hidden from backtraces.
bool IsInlined() override
Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived ...
const char * GetDisplayFunctionName() override
Get the frame's demangled display name.
std::shared_ptr< DynamicRegisterInfo > GetDynamicRegisterInfo()
This base class provides an interface to stack frames.
Definition StackFrame.h:44
std::shared_ptr< Generic > GenericSP
std::shared_ptr< Dictionary > DictionarySP
Defines a symbol context baton that can be handed other debug core functions.
A class that represents a running process on the host machine.
uint64_t user_id_t
Definition lldb-types.h:82
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
std::shared_ptr< lldb_private::ScriptedFrameInterface > ScriptedFrameInterfaceSP