LLDB mainline
|
#include <UnwindLLDB.h>
Classes | |
struct | Cursor |
struct | RegisterLocation |
Public Types | |
enum | RegisterSearchResult { eRegisterFound = 0 , eRegisterNotFound , eRegisterIsVolatile } |
Public Member Functions | |
UnwindLLDB (lldb_private::Thread &thread) | |
~UnwindLLDB () override=default | |
Public Member Functions inherited from lldb_private::Unwind | |
virtual | ~Unwind ()=default |
void | Clear () |
uint32_t | GetFrameCount () |
uint32_t | GetFramesUpTo (uint32_t end_idx) |
bool | GetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &pc, bool &behaves_like_zeroth_frame) |
lldb::RegisterContextSP | CreateRegisterContextForFrame (StackFrame *frame) |
Thread & | GetThread () |
Protected Types | |
typedef std::shared_ptr< RegisterContextUnwind > | RegisterContextLLDBSP |
Protected Member Functions | |
void | DoClear () override |
uint32_t | DoGetFrameCount () override |
bool | DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &start_pc, bool &behaves_like_zeroth_frame) override |
lldb::RegisterContextSP | DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame) override |
RegisterContextLLDBSP | GetRegisterContextForFrameNum (uint32_t frame_num) |
bool | SearchForSavedLocationForRegister (uint32_t lldb_regnum, lldb_private::UnwindLLDB::RegisterLocation ®loc, uint32_t starting_frame_num, bool pc_register) |
const std::vector< ConstString > & | GetUserSpecifiedTrapHandlerFunctionNames () |
Provide the list of user-specified trap handler functions. | |
Protected Member Functions inherited from lldb_private::Unwind | |
Unwind (Thread &thread) | |
virtual void | DoClear ()=0 |
virtual uint32_t | DoGetFrameCount ()=0 |
virtual bool | DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &pc, bool &behaves_like_zeroth_frame)=0 |
virtual lldb::RegisterContextSP | DoCreateRegisterContextForFrame (StackFrame *frame)=0 |
Private Types | |
typedef std::shared_ptr< Cursor > | CursorSP |
Private Member Functions | |
void | UpdateUnwindPlanForFirstFrameIfInvalid (ABI *abi) |
CursorSP | GetOneMoreFrame (ABI *abi) |
bool | AddOneMoreFrame (ABI *abi) |
bool | AddFirstFrame () |
UnwindLLDB (const UnwindLLDB &)=delete | |
const UnwindLLDB & | operator= (const UnwindLLDB &)=delete |
Private Attributes | |
std::vector< CursorSP > | m_frames |
CursorSP | m_candidate_frame |
bool | m_unwind_complete |
std::vector< ConstString > | m_user_supplied_trap_handler_functions |
Friends | |
class | lldb_private::RegisterContextUnwind |
Additional Inherited Members | |
Protected Attributes inherited from lldb_private::Unwind | |
Thread & | m_thread |
std::recursive_mutex | m_unwind_mutex |
Definition at line 26 of file UnwindLLDB.h.
|
private |
Definition at line 129 of file UnwindLLDB.h.
|
protected |
Definition at line 82 of file UnwindLLDB.h.
Enumerator | |
---|---|
eRegisterFound | |
eRegisterNotFound | |
eRegisterIsVolatile |
Definition at line 32 of file UnwindLLDB.h.
UnwindLLDB::UnwindLLDB | ( | lldb_private::Thread & | thread | ) |
Definition at line 26 of file UnwindLLDB.cpp.
References lldb_private::Args::GetArgumentAtIndex(), lldb_private::Args::GetArgumentCount(), lldb_private::Thread::GetProcess(), and m_user_supplied_trap_handler_functions.
|
overridedefault |
|
privatedelete |
|
private |
Definition at line 71 of file UnwindLLDB.cpp.
References lldb_private::Thread::GetIndexID(), lldb_private::GetLog(), lldb_private::Thread::GetProcess(), LLDB_LOGF, lldb_private::RegisterContextUnwind, m_frames, lldb_private::Unwind::m_thread, m_unwind_complete, lldb_private::Unwind, and UpdateUnwindPlanForFirstFrameIfInvalid().
Referenced by DoCreateRegisterContextForFrame(), DoGetFrameCount(), and DoGetFrameInfoAtIndex().
|
private |
Definition at line 323 of file UnwindLLDB.cpp.
References lldb_private::Thread::GetIndexID(), lldb_private::GetLog(), GetOneMoreFrame(), LLDB_LOGF, m_candidate_frame, m_frames, lldb_private::Unwind::m_thread, m_unwind_complete, and lldb_private::Unwind.
Referenced by DoCreateRegisterContextForFrame(), DoGetFrameCount(), DoGetFrameInfoAtIndex(), and UpdateUnwindPlanForFirstFrameIfInvalid().
|
inlineoverrideprotectedvirtual |
Implements lldb_private::Unwind.
Definition at line 67 of file UnwindLLDB.h.
References m_candidate_frame, m_frames, and m_unwind_complete.
|
overrideprotectedvirtual |
Implements lldb_private::Unwind.
Definition at line 439 of file UnwindLLDB.cpp.
References AddFirstFrame(), AddOneMoreFrame(), lldb_private::StackFrame::GetConcreteFrameIndex(), lldb_private::Thread::GetProcess(), lldb_private::Thread::GetRegisterContext(), m_frames, lldb_private::Unwind::m_thread, and lldb_private::UnwindLLDB::Cursor::reg_ctx_lldb_sp.
|
overrideprotectedvirtual |
Implements lldb_private::Unwind.
Definition at line 41 of file UnwindLLDB.cpp.
References AddFirstFrame(), AddOneMoreFrame(), lldb_private::Thread::GetProcess(), m_frames, lldb_private::Unwind::m_thread, and m_unwind_complete.
|
overrideprotectedvirtual |
Implements lldb_private::Unwind.
Definition at line 397 of file UnwindLLDB.cpp.
References AddFirstFrame(), AddOneMoreFrame(), lldb_private::Thread::GetProcess(), m_frames, lldb_private::Unwind::m_thread, and pc.
|
private |
Definition at line 114 of file UnwindLLDB.cpp.
References lldb_private::ABI::CallFrameAddressIsValid(), lldb_private::ABI::CodeAddressIsValid(), lldb_private::Thread::GetIndexID(), lldb_private::GetLog(), lldb_private::ThreadProperties::GetMaxBacktraceDepth(), GetOneMoreFrame(), LLDB_LOGF, lldb_private::RegisterContextUnwind, m_frames, lldb_private::Unwind::m_thread, m_unwind_complete, and lldb_private::Unwind.
Referenced by AddOneMoreFrame(), and GetOneMoreFrame().
|
protected |
Definition at line 469 of file UnwindLLDB.cpp.
References m_frames.
Referenced by lldb_private::RegisterContextUnwind::GetNextFrame(), and lldb_private::RegisterContextUnwind::GetPrevFrame().
|
inlineprotected |
Provide the list of user-specified trap handler functions.
The Platform is one source of trap handler function names; that may be augmented via a setting. The setting needs to be converted into an array of ConstStrings before it can be used - we only want to do that once per thread so it's here in the UnwindLLDB object.
Definition at line 106 of file UnwindLLDB.h.
References m_user_supplied_trap_handler_functions.
Referenced by lldb_private::RegisterContextUnwind::IsTrapHandlerSymbol().
|
privatedelete |
|
protected |
Definition at line 476 of file UnwindLLDB.cpp.
References eRegisterFound, lldb_private::UnwindLLDB::RegisterLocation::eRegisterInLiveRegisterContext, lldb_private::UnwindLLDB::RegisterLocation::eRegisterInRegister, eRegisterIsVolatile, eRegisterNotFound, lldb_private::UnwindLLDB::RegisterLocation::location, m_frames, lldb_private::UnwindLLDB::RegisterLocation::register_number, and lldb_private::UnwindLLDB::RegisterLocation::type.
Referenced by lldb_private::RegisterContextUnwind::ReadGPRValue(), lldb_private::RegisterContextUnwind::ReadRegister(), and lldb_private::RegisterContextUnwind::WriteRegister().
|
private |
Definition at line 301 of file UnwindLLDB.cpp.
References AddOneMoreFrame(), m_candidate_frame, m_frames, and m_unwind_complete.
Referenced by AddFirstFrame().
|
friend |
Definition at line 39 of file UnwindLLDB.h.
Referenced by AddFirstFrame(), and GetOneMoreFrame().
|
private |
Definition at line 131 of file UnwindLLDB.h.
Referenced by AddOneMoreFrame(), DoClear(), and UpdateUnwindPlanForFirstFrameIfInvalid().
|
private |
Definition at line 130 of file UnwindLLDB.h.
Referenced by AddFirstFrame(), AddOneMoreFrame(), DoClear(), DoCreateRegisterContextForFrame(), DoGetFrameCount(), DoGetFrameInfoAtIndex(), GetOneMoreFrame(), GetRegisterContextForFrameNum(), SearchForSavedLocationForRegister(), and UpdateUnwindPlanForFirstFrameIfInvalid().
|
private |
Definition at line 132 of file UnwindLLDB.h.
Referenced by AddFirstFrame(), AddOneMoreFrame(), DoClear(), DoGetFrameCount(), GetOneMoreFrame(), and UpdateUnwindPlanForFirstFrameIfInvalid().
|
private |
Definition at line 138 of file UnwindLLDB.h.
Referenced by GetUserSpecifiedTrapHandlerFunctionNames(), and UnwindLLDB().