LLDB  mainline
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::CompactUnwindInfo Class Reference

#include <CompactUnwindInfo.h>

Collaboration diagram for lldb_private::CompactUnwindInfo:
Collaboration graph
[legend]

Classes

struct  FunctionInfo
 
struct  UnwindHeader
 
struct  UnwindIndex
 

Public Member Functions

 CompactUnwindInfo (ObjectFile &objfile, lldb::SectionSP &section)
 
 ~CompactUnwindInfo ()
 
bool GetUnwindPlan (Target &target, Address addr, UnwindPlan &unwind_plan)
 
bool IsValid (const lldb::ProcessSP &process_sp)
 

Private Member Functions

void ScanIndex (const lldb::ProcessSP &process_sp)
 
bool GetCompactUnwindInfoForFunction (Target &target, Address address, FunctionInfo &unwind_info)
 
lldb::offset_t BinarySearchRegularSecondPage (uint32_t entry_page_offset, uint32_t entry_count, uint32_t function_offset, uint32_t *entry_func_start_offset, uint32_t *entry_func_end_offset)
 
uint32_t BinarySearchCompressedSecondPage (uint32_t entry_page_offset, uint32_t entry_count, uint32_t function_offset_to_find, uint32_t function_offset_base, uint32_t *entry_func_start_offset, uint32_t *entry_func_end_offset)
 
uint32_t GetLSDAForFunctionOffset (uint32_t lsda_offset, uint32_t lsda_count, uint32_t function_offset)
 
bool CreateUnwindPlan_x86_64 (Target &target, FunctionInfo &function_info, UnwindPlan &unwind_plan, Address pc_or_function_start)
 
bool CreateUnwindPlan_i386 (Target &target, FunctionInfo &function_info, UnwindPlan &unwind_plan, Address pc_or_function_start)
 
bool CreateUnwindPlan_arm64 (Target &target, FunctionInfo &function_info, UnwindPlan &unwind_plan, Address pc_or_function_start)
 
bool CreateUnwindPlan_armv7 (Target &target, FunctionInfo &function_info, UnwindPlan &unwind_plan, Address pc_or_function_start)
 

Private Attributes

ObjectFilem_objfile
 
lldb::SectionSP m_section_sp
 
lldb::DataBufferSP m_section_contents_if_encrypted
 
std::mutex m_mutex
 
std::vector< UnwindIndexm_indexes
 
LazyBool m_indexes_computed
 
DataExtractor m_unwindinfo_data
 
bool m_unwindinfo_data_computed
 
UnwindHeader m_unwind_header
 

Detailed Description

Definition at line 36 of file CompactUnwindInfo.h.

Constructor & Destructor Documentation

◆ CompactUnwindInfo()

CompactUnwindInfo::CompactUnwindInfo ( ObjectFile objfile,
lldb::SectionSP &  section 
)

Definition at line 162 of file CompactUnwindInfo.cpp.

◆ ~CompactUnwindInfo()

CompactUnwindInfo::~CompactUnwindInfo ( )
default

Member Function Documentation

◆ BinarySearchCompressedSecondPage()

uint32_t CompactUnwindInfo::BinarySearchCompressedSecondPage ( uint32_t  entry_page_offset,
uint32_t  entry_count,
uint32_t  function_offset_to_find,
uint32_t  function_offset_base,
uint32_t entry_func_start_offset,
uint32_t entry_func_end_offset 
)
private

◆ BinarySearchRegularSecondPage()

lldb::offset_t CompactUnwindInfo::BinarySearchRegularSecondPage ( uint32_t  entry_page_offset,
uint32_t  entry_count,
uint32_t  function_offset,
uint32_t entry_func_start_offset,
uint32_t entry_func_end_offset 
)
private

◆ CreateUnwindPlan_arm64()

bool CompactUnwindInfo::CreateUnwindPlan_arm64 ( Target target,
FunctionInfo function_info,
UnwindPlan unwind_plan,
Address  pc_or_function_start 
)
private

◆ CreateUnwindPlan_armv7()

bool CompactUnwindInfo::CreateUnwindPlan_armv7 ( Target target,
FunctionInfo function_info,
UnwindPlan unwind_plan,
Address  pc_or_function_start 
)
private

◆ CreateUnwindPlan_i386()

bool CompactUnwindInfo::CreateUnwindPlan_i386 ( Target target,
FunctionInfo function_info,
UnwindPlan unwind_plan,
Address  pc_or_function_start 
)
private

◆ CreateUnwindPlan_x86_64()

bool CompactUnwindInfo::CreateUnwindPlan_x86_64 ( Target target,
FunctionInfo function_info,
UnwindPlan unwind_plan,
Address  pc_or_function_start 
)
private

◆ GetCompactUnwindInfoForFunction()

bool CompactUnwindInfo::GetCompactUnwindInfoForFunction ( Target target,
Address  address,
FunctionInfo unwind_info 
)
private

Definition at line 491 of file CompactUnwindInfo.cpp.

References BinarySearchCompressedSecondPage(), BinarySearchRegularSecondPage(), lldb_private::Address::Clear(), lldb_private::CompactUnwindInfo::UnwindHeader::common_encodings_array_count, lldb_private::CompactUnwindInfo::UnwindHeader::common_encodings_array_offset, lldb_private::CompactUnwindInfo::FunctionInfo::encoding, lldb::eSectionTypeCode, EXTRACT_BITS, lldb_private::SectionList::FindSectionByType(), lldb_private::CompactUnwindInfo::UnwindIndex::function_offset, lldb_private::ObjectFile::GetBaseAddress(), lldb_private::Address::GetFileAddress(), GetLSDAForFunctionOffset(), lldb_private::Target::GetProcessSP(), lldb_private::ObjectFile::GetSectionList(), lldb_private::DataExtractor::GetU16(), lldb_private::DataExtractor::GetU32(), IsValid(), LLDB_INVALID_ADDRESS, LLDB_INVALID_OFFSET, lldb_private::CompactUnwindInfo::FunctionInfo::lsda_address, m_indexes, m_objfile, m_unwind_header, m_unwindinfo_data, lldb_private::CompactUnwindInfo::UnwindHeader::personality_array_count, lldb_private::CompactUnwindInfo::UnwindHeader::personality_array_offset, lldb_private::CompactUnwindInfo::FunctionInfo::personality_ptr_address, lldb_private::Address::ResolveAddressUsingFileSections(), UINT32_MAX, UNWIND_SECOND_LEVEL_COMPRESSED, UNWIND_SECOND_LEVEL_REGULAR, lldb_private::CompactUnwindInfo::FunctionInfo::valid_range_offset_end, and lldb_private::CompactUnwindInfo::FunctionInfo::valid_range_offset_start.

Referenced by GetUnwindPlan().

◆ GetLSDAForFunctionOffset()

uint32_t CompactUnwindInfo::GetLSDAForFunctionOffset ( uint32_t  lsda_offset,
uint32_t  lsda_count,
uint32_t  function_offset 
)
private

◆ GetUnwindPlan()

bool CompactUnwindInfo::GetUnwindPlan ( Target target,
Address  addr,
UnwindPlan unwind_plan 
)

◆ IsValid()

bool CompactUnwindInfo::IsValid ( const lldb::ProcessSP &  process_sp)

◆ ScanIndex()

void CompactUnwindInfo::ScanIndex ( const lldb::ProcessSP &  process_sp)
private

Member Data Documentation

◆ m_indexes

std::vector<UnwindIndex> lldb_private::CompactUnwindInfo::m_indexes
private

Definition at line 146 of file CompactUnwindInfo.h.

Referenced by GetCompactUnwindInfoForFunction(), and ScanIndex().

◆ m_indexes_computed

LazyBool lldb_private::CompactUnwindInfo::m_indexes_computed
private

Definition at line 148 of file CompactUnwindInfo.h.

Referenced by IsValid(), and ScanIndex().

◆ m_mutex

std::mutex lldb_private::CompactUnwindInfo::m_mutex
private

Definition at line 145 of file CompactUnwindInfo.h.

Referenced by ScanIndex().

◆ m_objfile

ObjectFile& lldb_private::CompactUnwindInfo::m_objfile
private

◆ m_section_contents_if_encrypted

lldb::DataBufferSP lldb_private::CompactUnwindInfo::m_section_contents_if_encrypted
private

Definition at line 141 of file CompactUnwindInfo.h.

Referenced by ScanIndex().

◆ m_section_sp

lldb::SectionSP lldb_private::CompactUnwindInfo::m_section_sp
private

Definition at line 140 of file CompactUnwindInfo.h.

Referenced by IsValid(), and ScanIndex().

◆ m_unwind_header

UnwindHeader lldb_private::CompactUnwindInfo::m_unwind_header
private

Definition at line 157 of file CompactUnwindInfo.h.

Referenced by GetCompactUnwindInfoForFunction(), and ScanIndex().

◆ m_unwindinfo_data

DataExtractor lldb_private::CompactUnwindInfo::m_unwindinfo_data
private

◆ m_unwindinfo_data_computed

bool lldb_private::CompactUnwindInfo::m_unwindinfo_data_computed
private

Definition at line 154 of file CompactUnwindInfo.h.

Referenced by IsValid(), and ScanIndex().


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