LLDB mainline
lldb_private::UnwindLLDB Class Reference

#include <UnwindLLDB.h>

Inheritance diagram for lldb_private::UnwindLLDB:
[legend]

Classes

struct  ConcreteRegisterLocation
 An UnwindPlan::Row::AbstractRegisterLocation, combined with the register context and memory for a specific stop point, is used to create a ConcreteRegisterLocation. More...
struct  Cursor

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)
ThreadGetThread ()

Protected Types

typedef std::shared_ptr< RegisterContextUnwindRegisterContextLLDBSP

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::ConcreteRegisterLocation &regloc, 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)

Private Types

typedef std::shared_ptr< CursorCursorSP

Private Member Functions

void UpdateUnwindPlanForFirstFrameIfInvalid (ABI *abi)
CursorSP GetOneMoreFrame (ABI *abi)
bool AddOneMoreFrame (ABI *abi)
bool AddFirstFrame ()
 UnwindLLDB (const UnwindLLDB &)=delete
const UnwindLLDBoperator= (const UnwindLLDB &)=delete

Private Attributes

std::vector< CursorSPm_frames
CursorSP m_candidate_frame
bool m_unwind_complete
std::vector< ConstStringm_user_supplied_trap_handler_functions

Friends

class lldb_private::RegisterContextUnwind
class lldb_private::ArchitectureArm

Additional Inherited Members

Protected Attributes inherited from lldb_private::Unwind
Threadm_thread
std::recursive_mutex m_unwind_mutex

Detailed Description

Definition at line 27 of file UnwindLLDB.h.

Member Typedef Documentation

◆ CursorSP

typedef std::shared_ptr<Cursor> lldb_private::UnwindLLDB::CursorSP
private

Definition at line 143 of file UnwindLLDB.h.

◆ RegisterContextLLDBSP

Definition at line 95 of file UnwindLLDB.h.

Member Enumeration Documentation

◆ RegisterSearchResult

Enumerator
eRegisterFound 
eRegisterNotFound 
eRegisterIsVolatile 

Definition at line 33 of file UnwindLLDB.h.

Constructor & Destructor Documentation

◆ UnwindLLDB() [1/2]

◆ ~UnwindLLDB()

lldb_private::UnwindLLDB::~UnwindLLDB ( )
overridedefault

◆ UnwindLLDB() [2/2]

lldb_private::UnwindLLDB::UnwindLLDB ( const UnwindLLDB & )
privatedelete

References UnwindLLDB().

Member Function Documentation

◆ AddFirstFrame()

◆ AddOneMoreFrame()

◆ DoClear()

void lldb_private::UnwindLLDB::DoClear ( )
inlineoverrideprotectedvirtual

Implements lldb_private::Unwind.

Definition at line 80 of file UnwindLLDB.h.

References m_candidate_frame, m_frames, and m_unwind_complete.

◆ DoCreateRegisterContextForFrame()

◆ DoGetFrameCount()

uint32_t UnwindLLDB::DoGetFrameCount ( )
overrideprotectedvirtual

◆ DoGetFrameInfoAtIndex()

bool UnwindLLDB::DoGetFrameInfoAtIndex ( uint32_t frame_idx,
lldb::addr_t & cfa,
lldb::addr_t & start_pc,
bool & behaves_like_zeroth_frame )
overrideprotectedvirtual

◆ GetOneMoreFrame()

◆ GetRegisterContextForFrameNum()

UnwindLLDB::RegisterContextLLDBSP UnwindLLDB::GetRegisterContextForFrameNum ( uint32_t frame_num)
protected

Definition at line 469 of file UnwindLLDB.cpp.

References m_frames.

◆ GetUserSpecifiedTrapHandlerFunctionNames()

const std::vector< ConstString > & lldb_private::UnwindLLDB::GetUserSpecifiedTrapHandlerFunctionNames ( )
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.

Returns
Vector of ConstStrings of trap handler function names. May be empty.

Definition at line 120 of file UnwindLLDB.h.

References m_user_supplied_trap_handler_functions.

◆ operator=()

const UnwindLLDB & lldb_private::UnwindLLDB::operator= ( const UnwindLLDB & )
privatedelete

References UnwindLLDB().

◆ SearchForSavedLocationForRegister()

◆ UpdateUnwindPlanForFirstFrameIfInvalid()

void UnwindLLDB::UpdateUnwindPlanForFirstFrameIfInvalid ( ABI * abi)
private

Definition at line 301 of file UnwindLLDB.cpp.

References AddOneMoreFrame(), m_candidate_frame, m_frames, and m_unwind_complete.

Referenced by AddFirstFrame().

◆ lldb_private::ArchitectureArm

friend class lldb_private::ArchitectureArm
friend

Definition at line 41 of file UnwindLLDB.h.

◆ lldb_private::RegisterContextUnwind

Definition at line 40 of file UnwindLLDB.h.

Referenced by AddFirstFrame(), and GetOneMoreFrame().

Member Data Documentation

◆ m_candidate_frame

CursorSP lldb_private::UnwindLLDB::m_candidate_frame
private

Definition at line 145 of file UnwindLLDB.h.

Referenced by AddOneMoreFrame(), DoClear(), and UpdateUnwindPlanForFirstFrameIfInvalid().

◆ m_frames

◆ m_unwind_complete

bool lldb_private::UnwindLLDB::m_unwind_complete
private

◆ m_user_supplied_trap_handler_functions

std::vector<ConstString> lldb_private::UnwindLLDB::m_user_supplied_trap_handler_functions
private

Definition at line 152 of file UnwindLLDB.h.

Referenced by GetUserSpecifiedTrapHandlerFunctionNames(), and UnwindLLDB().


The documentation for this class was generated from the following files: