LLDB mainline
|
#include <CompactUnwindInfo.h>
Classes | |
struct | FunctionInfo |
struct | UnwindHeader |
struct | UnwindIndex |
Public Member Functions | |
CompactUnwindInfo (ObjectFile &objfile, lldb::SectionSP §ion) | |
~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 | |
ObjectFile & | m_objfile |
lldb::SectionSP | m_section_sp |
lldb::WritableDataBufferSP | m_section_contents_if_encrypted |
std::mutex | m_mutex |
std::vector< UnwindIndex > | m_indexes |
LazyBool | m_indexes_computed |
DataExtractor | m_unwindinfo_data |
bool | m_unwindinfo_data_computed |
UnwindHeader | m_unwind_header |
Definition at line 36 of file CompactUnwindInfo.h.
CompactUnwindInfo::CompactUnwindInfo | ( | ObjectFile & | objfile, |
lldb::SectionSP & | section | ||
) |
Definition at line 163 of file CompactUnwindInfo.cpp.
|
default |
|
private |
Definition at line 451 of file CompactUnwindInfo.cpp.
References lldb_private::DataExtractor::GetU32(), m_unwindinfo_data, UINT32_MAX, UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX, and UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET.
Referenced by GetCompactUnwindInfoForFunction().
|
private |
Definition at line 411 of file CompactUnwindInfo.cpp.
References lldb_private::DataExtractor::GetU32(), LLDB_INVALID_OFFSET, and m_unwindinfo_data.
Referenced by GetCompactUnwindInfoForFunction().
|
private |
Definition at line 1303 of file CompactUnwindInfo.cpp.
References lldb_private::UnwindPlan::AppendRow(), lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::CompactUnwindInfo::FunctionInfo::encoding, lldb::eRegisterKindEHFrame, EXTRACT_BITS, lldb_private::CompactUnwindInfo::FunctionInfo::lsda_address, lldb_private::CompactUnwindInfo::FunctionInfo::personality_ptr_address, lldb_private::UnwindPlan::SetLSDAAddress(), lldb_private::UnwindPlan::SetPersonalityFunctionPtr(), lldb_private::UnwindPlan::SetRegisterKind(), lldb_private::UnwindPlan::SetSourcedFromCompiler(), lldb_private::UnwindPlan::SetSourceName(), lldb_private::UnwindPlan::SetUnwindPlanForSignalTrap(), and lldb_private::UnwindPlan::SetUnwindPlanValidAtAllInstructions().
Referenced by GetUnwindPlan().
|
private |
Definition at line 1437 of file CompactUnwindInfo.cpp.
References lldb_private::UnwindPlan::AppendRow(), arm_d10, arm_d12, arm_d14, arm_d8, arm_pc, arm_r10, arm_r11, arm_r12, arm_r4, arm_r5, arm_r6, arm_r7, arm_r8, arm_r9, arm_sp, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::CompactUnwindInfo::FunctionInfo::encoding, lldb::eRegisterKindEHFrame, EXTRACT_BITS, lldb_private::CompactUnwindInfo::FunctionInfo::lsda_address, lldb_private::CompactUnwindInfo::FunctionInfo::personality_ptr_address, lldb_private::UnwindPlan::SetLSDAAddress(), lldb_private::UnwindPlan::SetPersonalityFunctionPtr(), lldb_private::UnwindPlan::SetRegisterKind(), lldb_private::UnwindPlan::SetSourcedFromCompiler(), lldb_private::UnwindPlan::SetSourceName(), lldb_private::UnwindPlan::SetUnwindPlanForSignalTrap(), and lldb_private::UnwindPlan::SetUnwindPlanValidAtAllInstructions().
Referenced by GetUnwindPlan().
|
private |
Definition at line 1006 of file CompactUnwindInfo.cpp.
References lldb_private::UnwindPlan::AppendRow(), lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::CompactUnwindInfo::FunctionInfo::encoding, lldb::eRegisterKindEHFrame, error(), EXTRACT_BITS, lldb_private::Address::GetLoadAddress(), lldb_private::Target::GetProcessSP(), lldb_private::ObjectFile::GetSectionList(), lldb_private::CompactUnwindInfo::FunctionInfo::lsda_address, m_objfile, lldb_private::CompactUnwindInfo::FunctionInfo::personality_ptr_address, lldb_private::UnwindPlan::SetLSDAAddress(), lldb_private::UnwindPlan::SetPersonalityFunctionPtr(), lldb_private::UnwindPlan::SetRegisterKind(), lldb_private::UnwindPlan::SetSourcedFromCompiler(), lldb_private::UnwindPlan::SetSourceName(), lldb_private::UnwindPlan::SetUnwindPlanForSignalTrap(), lldb_private::UnwindPlan::SetUnwindPlanValidAtAllInstructions(), lldb_private::Address::Slide(), translate_to_eh_frame_regnum_i386(), lldb_private::UNWIND_X86_REG_EBP, lldb_private::UNWIND_X86_REG_EBX, lldb_private::UNWIND_X86_REG_ECX, lldb_private::UNWIND_X86_REG_EDI, lldb_private::UNWIND_X86_REG_EDX, lldb_private::UNWIND_X86_REG_ESI, lldb_private::UNWIND_X86_REG_NONE, and lldb_private::CompactUnwindInfo::FunctionInfo::valid_range_offset_start.
Referenced by GetUnwindPlan().
|
private |
Definition at line 734 of file CompactUnwindInfo.cpp.
References lldb_private::UnwindPlan::AppendRow(), lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::CompactUnwindInfo::FunctionInfo::encoding, lldb::eRegisterKindEHFrame, error(), EXTRACT_BITS, lldb_private::Address::GetLoadAddress(), lldb_private::Target::GetProcessSP(), lldb_private::ObjectFile::GetSectionList(), lldb_private::CompactUnwindInfo::FunctionInfo::lsda_address, m_objfile, lldb_private::CompactUnwindInfo::FunctionInfo::personality_ptr_address, lldb_private::UnwindPlan::SetLSDAAddress(), lldb_private::UnwindPlan::SetPersonalityFunctionPtr(), lldb_private::UnwindPlan::SetRegisterKind(), lldb_private::UnwindPlan::SetSourcedFromCompiler(), lldb_private::UnwindPlan::SetSourceName(), lldb_private::UnwindPlan::SetUnwindPlanForSignalTrap(), lldb_private::UnwindPlan::SetUnwindPlanValidAtAllInstructions(), lldb_private::Address::Slide(), translate_to_eh_frame_regnum_x86_64(), lldb_private::UNWIND_X86_64_REG_NONE, lldb_private::UNWIND_X86_64_REG_R12, lldb_private::UNWIND_X86_64_REG_R13, lldb_private::UNWIND_X86_64_REG_R14, lldb_private::UNWIND_X86_64_REG_R15, lldb_private::UNWIND_X86_64_REG_RBP, lldb_private::UNWIND_X86_64_REG_RBX, and lldb_private::CompactUnwindInfo::FunctionInfo::valid_range_offset_start.
Referenced by GetUnwindPlan().
|
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().
|
private |
Definition at line 382 of file CompactUnwindInfo.cpp.
References lldb_private::DataExtractor::GetU32(), and m_unwindinfo_data.
Referenced by GetCompactUnwindInfoForFunction().
bool CompactUnwindInfo::GetUnwindPlan | ( | Target & | target, |
Address | addr, | ||
UnwindPlan & | unwind_plan | ||
) |
Definition at line 173 of file CompactUnwindInfo.cpp.
References CreateUnwindPlan_arm64(), CreateUnwindPlan_armv7(), CreateUnwindPlan_i386(), CreateUnwindPlan_x86_64(), lldb_private::Address::Dump(), lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleResolvedDescriptionNoFunctionArguments, lldb_private::CompactUnwindInfo::FunctionInfo::encoding, lldb_private::ObjectFile::GetArchitecture(), lldb_private::ObjectFile::GetBaseAddress(), GetCompactUnwindInfoForFunction(), lldb_private::StreamString::GetData(), lldb_private::Address::GetFileAddress(), lldb_private::GetLog(), lldb_private::Target::GetProcessSP(), lldb_private::ObjectFile::GetSectionList(), lldb_private::Log::GetVerbose(), IsValid(), LLDB_LOGF, m_objfile, lldb_private::UnwindPlan::SetPlanValidAddressRange(), lldb_private::Unwind, lldb_private::CompactUnwindInfo::FunctionInfo::valid_range_offset_end, and lldb_private::CompactUnwindInfo::FunctionInfo::valid_range_offset_start.
Referenced by lldb_private::FuncUnwinders::GetCompactUnwindUnwindPlan().
bool CompactUnwindInfo::IsValid | ( | const lldb::ProcessSP & | process_sp | ) |
Definition at line 233 of file CompactUnwindInfo.cpp.
References lldb_private::eLazyBoolYes, m_indexes_computed, m_section_sp, m_unwindinfo_data_computed, and ScanIndex().
Referenced by GetCompactUnwindInfoForFunction(), and GetUnwindPlan().
|
private |
Definition at line 245 of file CompactUnwindInfo.cpp.
References lldb_private::CompactUnwindInfo::UnwindHeader::common_encodings_array_count, lldb_private::CompactUnwindInfo::UnwindHeader::common_encodings_array_offset, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, error(), lldb_private::CompactUnwindInfo::UnwindIndex::function_offset, lldb_private::ObjectFile::GetArchitecture(), lldb_private::DataExtractor::GetByteSize(), lldb_private::GetLog(), lldb_private::ModuleChild::GetModule(), lldb_private::DataExtractor::GetU32(), lldb_private::CompactUnwindInfo::UnwindIndex::lsda_array_start, m_indexes, m_indexes_computed, m_mutex, m_objfile, m_section_contents_if_encrypted, m_section_sp, m_unwind_header, m_unwindinfo_data, m_unwindinfo_data_computed, lldb_private::CompactUnwindInfo::UnwindHeader::personality_array_count, lldb_private::CompactUnwindInfo::UnwindHeader::personality_array_offset, lldb_private::ObjectFile::ReadSectionData(), lldb_private::Debugger::ReportError(), lldb_private::CompactUnwindInfo::UnwindIndex::second_level, lldb_private::CompactUnwindInfo::UnwindIndex::sentinal_entry, lldb_private::DataExtractor::SetAddressByteSize(), lldb_private::DataExtractor::SetByteOrder(), lldb_private::DataExtractor::SetData(), lldb_private::Unwind, and lldb_private::CompactUnwindInfo::UnwindHeader::version.
Referenced by IsValid().
|
private |
Definition at line 147 of file CompactUnwindInfo.h.
Referenced by GetCompactUnwindInfoForFunction(), and ScanIndex().
|
private |
Definition at line 149 of file CompactUnwindInfo.h.
Referenced by IsValid(), and ScanIndex().
|
private |
Definition at line 146 of file CompactUnwindInfo.h.
Referenced by ScanIndex().
|
private |
Definition at line 139 of file CompactUnwindInfo.h.
Referenced by CreateUnwindPlan_i386(), CreateUnwindPlan_x86_64(), GetCompactUnwindInfoForFunction(), GetUnwindPlan(), and ScanIndex().
|
private |
Definition at line 142 of file CompactUnwindInfo.h.
Referenced by ScanIndex().
|
private |
Definition at line 140 of file CompactUnwindInfo.h.
Referenced by IsValid(), and ScanIndex().
|
private |
Definition at line 158 of file CompactUnwindInfo.h.
Referenced by GetCompactUnwindInfoForFunction(), and ScanIndex().
|
private |
Definition at line 154 of file CompactUnwindInfo.h.
Referenced by BinarySearchCompressedSecondPage(), BinarySearchRegularSecondPage(), GetCompactUnwindInfoForFunction(), GetLSDAForFunctionOffset(), and ScanIndex().
|
private |
Definition at line 155 of file CompactUnwindInfo.h.
Referenced by IsValid(), and ScanIndex().