|
LLDB mainline
|
#include <ScriptedFrame.h>
Public Member Functions | |
| ScriptedFrame (lldb::ThreadSP thread_sp, lldb::ScriptedFrameInterfaceSP interface_sp, lldb::user_id_t frame_idx, lldb::addr_t pc, SymbolContext &sym_ctx, lldb::RegisterContextSP reg_ctx_sp, StructuredData::GenericSP script_object_sp=nullptr) | |
| ~ScriptedFrame () override | |
| bool | IsInlined () override |
| Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived from the debug information and presented by the debugger. | |
| bool | IsArtificial () const override |
| Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frames from a backtrace). | |
| bool | IsHidden () override |
| Query whether this frame should be hidden from backtraces. | |
| const char * | GetFunctionName () override |
| Get the frame's demangled name. | |
| const char * | GetDisplayFunctionName () override |
| Get the frame's demangled display name. | |
| lldb::RegisterContextSP | GetRegisterContext () override |
| Get the RegisterContext for this frame, if possible. | |
| bool | isA (const void *ClassID) const override |
| Public Member Functions inherited from lldb_private::StackFrame | |
| StackFrame (const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, lldb::addr_t cfa, bool cfa_is_valid, lldb::addr_t pc, Kind frame_kind, bool artificial, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr) | |
| Construct a StackFrame object without supplying a RegisterContextSP. | |
| StackFrame (const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, const lldb::RegisterContextSP ®_context_sp, lldb::addr_t cfa, lldb::addr_t pc, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr) | |
| StackFrame (const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, const lldb::RegisterContextSP ®_context_sp, lldb::addr_t cfa, const Address &pc, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr) | |
| ~StackFrame () override | |
| lldb::ThreadSP | GetThread () const |
| virtual StackID & | GetStackID () |
| virtual const Address & | GetFrameCodeAddress () |
| Get an Address for the current pc value in this StackFrame. | |
| virtual Address | GetFrameCodeAddressForSymbolication () |
| Get the current code Address suitable for symbolication, may not be the same as GetFrameCodeAddress(). | |
| virtual bool | ChangePC (lldb::addr_t pc) |
| Change the pc value for a given thread. | |
| virtual const SymbolContext & | GetSymbolContext (lldb::SymbolContextItem resolve_scope) |
| Provide a SymbolContext for this StackFrame's current pc value. | |
| virtual llvm::Error | GetFrameBaseValue (Scalar &value) |
| Return the Canonical Frame Address (DWARF term) for this frame. | |
| virtual DWARFExpressionList * | GetFrameBaseExpression (Status *error_ptr) |
| Get the DWARFExpressionList corresponding to the Canonical Frame Address. | |
| virtual Block * | GetFrameBlock () |
| Get the current lexical scope block for this StackFrame, if possible. | |
| const lldb::RegisterContextSP & | GetRegisterContextSP () const |
| virtual VariableList * | GetVariableList (bool get_file_globals, Status *error_ptr) |
| Retrieve the list of variables whose scope either: | |
| virtual lldb::VariableListSP | GetInScopeVariableList (bool get_file_globals, bool must_have_valid_location=false) |
| Retrieve the list of variables that are in scope at this StackFrame's pc. | |
| virtual lldb::ValueObjectSP | GetValueForVariableExpressionPath (llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Status &error) |
| Create a ValueObject for a variable name / pathname, possibly including simple dereference/child selection syntax. | |
| virtual bool | HasDebugInformation () |
| Determine whether this StackFrame has debug information available or not. | |
| virtual const char * | Disassemble () |
| Return the disassembly for the instructions of this StackFrame's function as a single C string. | |
| virtual bool | DumpUsingFormat (Stream &strm, const lldb_private::FormatEntity::Entry *format, llvm::StringRef frame_marker={}) |
| Print a description of this frame using the provided frame format. | |
| virtual void | DumpUsingSettingsFormat (Stream *strm, bool show_unique=false, const char *frame_marker=nullptr) |
| Print a description for this frame using the frame-format formatter settings. | |
| virtual void | Dump (Stream *strm, bool show_frame_index, bool show_fullpaths) |
| Print a description for this frame using a default format. | |
| virtual bool | GetStatus (Stream &strm, bool show_frame_info, bool show_source, bool show_unique=false, const char *frame_marker=nullptr) |
| Print a description of this stack frame and/or the source context/assembly for this stack frame. | |
| virtual bool | IsSynthetic () const |
| Query whether this frame is synthetic. | |
| virtual bool | IsHistorical () const |
| Query whether this frame is part of a historical backtrace. | |
| virtual StructuredData::ObjectSP | GetLanguageSpecificData () |
| Language plugins can use this API to report language-specific runtime information about this compile unit, such as additional language version details or feature flags. | |
| virtual uint32_t | GetFrameIndex () const |
| Query this frame to find what frame it is in this Thread's StackFrameList. | |
| void | SetFrameIndex (uint32_t index) |
| Set this frame's frame index. | |
| virtual uint32_t | GetConcreteFrameIndex () |
| Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frames. | |
| virtual lldb::ValueObjectSP | GetValueObjectForFrameVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic) |
| Create a ValueObject for a given Variable in this StackFrame. | |
| virtual SourceLanguage | GetLanguage () |
| Query this frame to determine what the default language should be when parsing expressions given the execution context. | |
| virtual SourceLanguage | GuessLanguage () |
| Similar to GetLanguage(), but is allowed to take a potentially incorrect guess if exact information is not available. | |
| virtual lldb::ValueObjectSP | GuessValueForAddress (lldb::addr_t addr) |
| Attempt to econstruct the ValueObject for a given raw address touched by the current instruction. | |
| virtual lldb::ValueObjectSP | GuessValueForRegisterAndOffset (ConstString reg, int64_t offset) |
| Attempt to reconstruct the ValueObject for the address contained in a given register plus an offset. | |
| virtual lldb::ValueObjectSP | FindVariable (ConstString name) |
| Attempt to reconstruct the ValueObject for a variable with a given name from within the current StackFrame, within the current block. | |
| lldb::TargetSP | CalculateTarget () override |
| lldb::ProcessSP | CalculateProcess () override |
| lldb::ThreadSP | CalculateThread () override |
| lldb::StackFrameSP | CalculateStackFrame () override |
| void | CalculateExecutionContext (ExecutionContext &exe_ctx) override |
| Reconstruct the object's execution context into sc. | |
| virtual lldb::RecognizedStackFrameSP | GetRecognizedFrame () |
| virtual lldb::StackFrameListSP | GetContainingStackFrameList () const |
| Get the StackFrameList that contains this frame. | |
| Public Member Functions inherited from lldb_private::ExecutionContextScope | |
| virtual | ~ExecutionContextScope ()=default |
Static Public Member Functions | |
| static llvm::Expected< std::shared_ptr< ScriptedFrame > > | Create (lldb::ThreadSP thread_sp, lldb::ScriptedThreadInterfaceSP scripted_thread_interface_sp, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_object=nullptr) |
| Create a ScriptedFrame from a object instanciated in the script interpreter. | |
| static bool | classof (const StackFrame *obj) |
| static bool | classof (const StackFrame *obj) |
Private Member Functions | |
| void | CheckInterpreterAndScriptObject () const |
| lldb::ScriptedFrameInterfaceSP | GetInterface () const |
| ScriptedFrame (const ScriptedFrame &)=delete | |
| const ScriptedFrame & | operator= (const ScriptedFrame &)=delete |
| std::shared_ptr< DynamicRegisterInfo > | GetDynamicRegisterInfo () |
Static Private Member Functions | |
| static llvm::Expected< lldb::RegisterContextSP > | CreateRegisterContext (ScriptedFrameInterface &interface, Thread &thread, lldb::user_id_t frame_id) |
Private Attributes | |
| lldb::ScriptedFrameInterfaceSP | m_scripted_frame_interface_sp |
| lldb_private::StructuredData::GenericSP | m_script_object_sp |
Static Private Attributes | |
| static char | ID |
Definition at line 22 of file ScriptedFrame.h.
| ScriptedFrame::ScriptedFrame | ( | lldb::ThreadSP | thread_sp, |
| lldb::ScriptedFrameInterfaceSP | interface_sp, | ||
| lldb::user_id_t | frame_idx, | ||
| lldb::addr_t | pc, | ||
| SymbolContext & | sym_ctx, | ||
| lldb::RegisterContextSP | reg_ctx_sp, | ||
| StructuredData::GenericSP | script_object_sp = nullptr ) |
Definition at line 122 of file ScriptedFrame.cpp.
References m_script_object_sp, m_scripted_frame_interface_sp, lldb_private::StackFrame::m_stack_frame_kind, pc, lldb_private::StackFrame::StackFrame(), and lldb_private::StackFrame::Synthetic.
Referenced by operator=(), and ScriptedFrame().
|
override |
Definition at line 138 of file ScriptedFrame.cpp.
|
privatedelete |
References ScriptedFrame().
|
private |
Definition at line 37 of file ScriptedFrame.cpp.
References GetInterface(), lldbassert, and m_script_object_sp.
Referenced by GetDisplayFunctionName(), GetDynamicRegisterInfo(), and GetFunctionName().
|
inlinestatic |
Definition at line 69 of file ScriptedFrame.h.
References ID, lldb_private::StackFrame::isA(), and lldb_private::StackFrame::StackFrame().
|
static |
Create a ScriptedFrame from a object instanciated in the script interpreter.
| [in] | thread_sp | The thread this frame belongs to. |
| [in] | scripted_thread_interface_sp | The scripted thread interface (needed for ScriptedThread compatibility). Can be nullptr for frames on real threads. |
| [in] | args_sp | Arguments to pass to the frame creation. |
| [in] | script_object | The optional script object representing this frame. |
Definition at line 43 of file ScriptedFrame.cpp.
References lldb_private::Address::CalculateSymbolContext(), CreateRegisterContext(), lldb_private::ScriptInterpreter::CreateScriptedFrameInterface(), lldb_private::GetLog(), LLDB_INVALID_ADDRESS, LLDB_LOG_ERROR, pc, lldb_private::Address::SetLoadAddress(), and lldb_private::Thread.
Referenced by lldb_private::ScriptedFrameProvider::GetFrameAtIndex(), and lldb_private::ScriptedThread::LoadArtificialStackFrames().
|
staticprivate |
Definition at line 202 of file ScriptedFrame.cpp.
References lldb_private::DynamicRegisterInfo::Create(), lldb_private::ScriptedFrameInterface::GetRegisterContext(), lldb_private::ScriptedFrameInterface::GetRegisterInfo(), and LLDB_INVALID_ADDRESS.
Referenced by Create(), and GetRegisterContext().
|
overridevirtual |
Get the frame's demangled display name.
///
Reimplemented from lldb_private::StackFrame.
Definition at line 148 of file ScriptedFrame.cpp.
References lldb_private::ConstString::AsCString(), CheckInterpreterAndScriptObject(), lldb_private::StackFrame::GetDisplayFunctionName(), and GetInterface().
|
private |
Definition at line 169 of file ScriptedFrame.cpp.
References CheckInterpreterAndScriptObject(), lldb_private::DynamicRegisterInfo::Create(), error(), lldb_private::ScriptedInterface::ErrorWithMessage(), GetInterface(), lldb_private::StackFrame::m_thread_wp, and lldb_private::Thread.
|
overridevirtual |
Get the frame's demangled name.
///
Reimplemented from lldb_private::StackFrame.
Definition at line 140 of file ScriptedFrame.cpp.
References lldb_private::ConstString::AsCString(), CheckInterpreterAndScriptObject(), lldb_private::StackFrame::GetFunctionName(), and GetInterface().
|
private |
Definition at line 165 of file ScriptedFrame.cpp.
References m_scripted_frame_interface_sp.
Referenced by CheckInterpreterAndScriptObject(), GetDisplayFunctionName(), GetDynamicRegisterInfo(), GetFunctionName(), IsArtificial(), IsHidden(), and IsInlined().
|
overridevirtual |
Get the RegisterContext for this frame, if possible.
Returns a shared pointer to the RegisterContext for this stack frame. Only a live StackFrame object will be able to return a RegisterContext - callers must be prepared for an empty shared pointer being returned.
Even a live StackFrame RegisterContext may not be able to provide all registers. Only the currently executing frame (frame 0) can reliably provide every register in the register context.
Reimplemented from lldb_private::StackFrame.
Definition at line 237 of file ScriptedFrame.cpp.
References CreateRegisterContext(), error(), lldb_private::ScriptedInterface::ErrorWithMessage(), lldb_private::Status::FromError(), lldb_private::StackFrame::GetFrameIndex(), lldb_private::StackFrame::GetThread(), lldb_private::StackFrame::m_reg_context_sp, m_scripted_frame_interface_sp, and lldb_private::Thread.
|
inlineoverridevirtual |
Reimplemented from lldb_private::StackFrame.
Definition at line 66 of file ScriptedFrame.h.
References ID, and lldb_private::StackFrame::isA().
|
overridevirtual |
Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frames from a backtrace).
Artificial frames may have limited support for inspecting variables.
Reimplemented from lldb_private::StackFrame.
Definition at line 159 of file ScriptedFrame.cpp.
References GetInterface().
|
overridevirtual |
Query whether this frame should be hidden from backtraces.
Frame recognizers can customize this behavior and hide distracting system implementation details this way.
Reimplemented from lldb_private::StackFrame.
Definition at line 163 of file ScriptedFrame.cpp.
References GetInterface().
|
overridevirtual |
Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived from the debug information and presented by the debugger.
Reimplemented from lldb_private::StackFrame.
Definition at line 157 of file ScriptedFrame.cpp.
References GetInterface().
|
privatedelete |
References ScriptedFrame().
|
staticprivate |
Definition at line 86 of file ScriptedFrame.h.
|
private |
Definition at line 84 of file ScriptedFrame.h.
Referenced by CheckInterpreterAndScriptObject(), and ScriptedFrame().
|
private |
Definition at line 83 of file ScriptedFrame.h.
Referenced by GetInterface(), GetRegisterContext(), and ScriptedFrame().