LLDB mainline
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
lldb_private::UnwindLLDB Class Reference

#include <UnwindLLDB.h>

Inheritance diagram for lldb_private::UnwindLLDB:
Inheritance graph
[legend]

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)
 
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::RegisterLocation &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)
 
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< 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
 

Additional Inherited Members

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

Detailed Description

Definition at line 26 of file UnwindLLDB.h.

Member Typedef Documentation

◆ CursorSP

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

Definition at line 129 of file UnwindLLDB.h.

◆ RegisterContextLLDBSP

Definition at line 82 of file UnwindLLDB.h.

Member Enumeration Documentation

◆ RegisterSearchResult

Enumerator
eRegisterFound 
eRegisterNotFound 
eRegisterIsVolatile 

Definition at line 32 of file UnwindLLDB.h.

Constructor & Destructor Documentation

◆ UnwindLLDB() [1/2]

UnwindLLDB::UnwindLLDB ( lldb_private::Thread thread)

◆ ~UnwindLLDB()

lldb_private::UnwindLLDB::~UnwindLLDB ( )
overridedefault

◆ UnwindLLDB() [2/2]

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

Member Function Documentation

◆ AddFirstFrame()

bool UnwindLLDB::AddFirstFrame ( )
private

◆ AddOneMoreFrame()

bool UnwindLLDB::AddOneMoreFrame ( ABI abi)
private

◆ DoClear()

void lldb_private::UnwindLLDB::DoClear ( )
inlineoverrideprotectedvirtual

Implements lldb_private::Unwind.

Definition at line 67 of file UnwindLLDB.h.

References m_candidate_frame, m_frames, and m_unwind_complete.

◆ DoCreateRegisterContextForFrame()

lldb::RegisterContextSP UnwindLLDB::DoCreateRegisterContextForFrame ( lldb_private::StackFrame frame)
overrideprotectedvirtual

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

UnwindLLDB::CursorSP UnwindLLDB::GetOneMoreFrame ( ABI abi)
private

◆ GetRegisterContextForFrameNum()

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

◆ 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 106 of file UnwindLLDB.h.

References m_user_supplied_trap_handler_functions.

Referenced by lldb_private::RegisterContextUnwind::IsTrapHandlerSymbol().

◆ operator=()

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

◆ SearchForSavedLocationForRegister()

bool UnwindLLDB::SearchForSavedLocationForRegister ( uint32_t  lldb_regnum,
lldb_private::UnwindLLDB::RegisterLocation regloc,
uint32_t  starting_frame_num,
bool  pc_register 
)
protected

◆ UpdateUnwindPlanForFirstFrameIfInvalid()

void UnwindLLDB::UpdateUnwindPlanForFirstFrameIfInvalid ( ABI abi)
private

Definition at line 296 of file UnwindLLDB.cpp.

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

Referenced by AddFirstFrame().

Friends And Related Function Documentation

◆ lldb_private::RegisterContextUnwind

Definition at line 39 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 131 of file UnwindLLDB.h.

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

◆ m_frames

std::vector<CursorSP> lldb_private::UnwindLLDB::m_frames
private

◆ 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 138 of file UnwindLLDB.h.

Referenced by GetUserSpecifiedTrapHandlerFunctionNames(), and UnwindLLDB().


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