#include "lldb/Symbol/DWARFCallFrameInfo.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/Section.h"
#include "lldb/Core/dwarf.h"
#include "lldb/Host/Host.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Timer.h"
#include <cstring>
#include <list>
#include <optional>
usingnamespacelldb;
usingnamespacelldb_private;
usingnamespacelldb_private::dwarf;
static uint64_t
GetGNUEHPointer(const DataExtractor &DE, lldb::offset_t *offset_ptr,
uint32_t eh_ptr_enc, addr_t pc_rel_addr, addr_t text_addr,
addr_t data_addr)
{ … }
DWARFCallFrameInfo::DWARFCallFrameInfo(ObjectFile &objfile,
SectionSP §ion_sp, Type type)
: … { … }
bool DWARFCallFrameInfo::GetUnwindPlan(const Address &addr,
UnwindPlan &unwind_plan) { … }
bool DWARFCallFrameInfo::GetUnwindPlan(const AddressRange &range,
UnwindPlan &unwind_plan) { … }
bool DWARFCallFrameInfo::GetAddressRange(Address addr, AddressRange &range) { … }
std::optional<DWARFCallFrameInfo::FDEEntryMap::Entry>
DWARFCallFrameInfo::GetFirstFDEEntryInRange(const AddressRange &range) { … }
void DWARFCallFrameInfo::GetFunctionAddressAndSizeVector(
FunctionAddressAndSizeVector &function_info) { … }
const DWARFCallFrameInfo::CIE *
DWARFCallFrameInfo::GetCIE(dw_offset_t cie_offset) { … }
DWARFCallFrameInfo::CIESP
DWARFCallFrameInfo::ParseCIE(const dw_offset_t cie_offset) { … }
void DWARFCallFrameInfo::GetCFIData() { … }
void DWARFCallFrameInfo::GetFDEIndex() { … }
bool DWARFCallFrameInfo::FDEToUnwindPlan(dw_offset_t dwarf_offset,
Address startaddr,
UnwindPlan &unwind_plan) { … }
bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
uint8_t extended_opcode,
int32_t data_align,
lldb::offset_t &offset,
UnwindPlan::Row &row) { … }
void DWARFCallFrameInfo::ForEachFDEEntries(
const std::function<bool(lldb::addr_t, uint32_t, dw_offset_t)> &callback) { … }