Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
// GetDIENamesAndRanges | // GetDIENamesAndRanges | ||||
// | // | ||||
// Gets the valid address ranges for a given DIE by looking for a | // Gets the valid address ranges for a given DIE by looking for a | ||||
// DW_AT_low_pc/DW_AT_high_pc pair, DW_AT_entry_pc, or DW_AT_ranges attributes. | // DW_AT_low_pc/DW_AT_high_pc pair, DW_AT_entry_pc, or DW_AT_ranges attributes. | ||||
bool DWARFDebugInfoEntry::GetDIENamesAndRanges( | bool DWARFDebugInfoEntry::GetDIENamesAndRanges( | ||||
DWARFUnit *cu, const char *&name, const char *&mangled, | DWARFUnit *cu, const char *&name, const char *&mangled, | ||||
DWARFRangeList &ranges, int &decl_file, int &decl_line, int &decl_column, | DWARFRangeList &ranges, std::optional<int> &decl_file, | ||||
int &call_file, int &call_line, int &call_column, | std::optional<int> &decl_line, std::optional<int> &decl_column, | ||||
DWARFExpressionList *frame_base) const { | std::optional<int> &call_file, std::optional<int> &call_line, | ||||
std::optional<int> &call_column, DWARFExpressionList *frame_base) const { | |||||
dw_addr_t lo_pc = LLDB_INVALID_ADDRESS; | dw_addr_t lo_pc = LLDB_INVALID_ADDRESS; | ||||
dw_addr_t hi_pc = LLDB_INVALID_ADDRESS; | dw_addr_t hi_pc = LLDB_INVALID_ADDRESS; | ||||
std::vector<DWARFDIE> dies; | std::vector<DWARFDIE> dies; | ||||
bool set_frame_base_loclist_addr = false; | bool set_frame_base_loclist_addr = false; | ||||
const auto *abbrevDecl = GetAbbreviationDeclarationPtr(cu); | const auto *abbrevDecl = GetAbbreviationDeclarationPtr(cu); | ||||
SymbolFileDWARF &dwarf = cu->GetSymbolFileDWARF(); | SymbolFileDWARF &dwarf = cu->GetSymbolFileDWARF(); | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | for (uint32_t i = 0; i < numAttributes; ++i) { | ||||
dies.push_back(form_value.Reference()); | dies.push_back(form_value.Reference()); | ||||
break; | break; | ||||
case DW_AT_specification: | case DW_AT_specification: | ||||
dies.push_back(form_value.Reference()); | dies.push_back(form_value.Reference()); | ||||
break; | break; | ||||
case DW_AT_decl_file: | case DW_AT_decl_file: | ||||
if (decl_file == 0) | if (!decl_file) | ||||
decl_file = form_value.Unsigned(); | decl_file = form_value.Unsigned(); | ||||
break; | break; | ||||
case DW_AT_decl_line: | case DW_AT_decl_line: | ||||
if (decl_line == 0) | if (!decl_line) | ||||
decl_line = form_value.Unsigned(); | decl_line = form_value.Unsigned(); | ||||
break; | break; | ||||
case DW_AT_decl_column: | case DW_AT_decl_column: | ||||
if (decl_column == 0) | if (!decl_column) | ||||
decl_column = form_value.Unsigned(); | decl_column = form_value.Unsigned(); | ||||
break; | break; | ||||
case DW_AT_call_file: | case DW_AT_call_file: | ||||
if (call_file == 0) | if (!call_file) | ||||
call_file = form_value.Unsigned(); | call_file = form_value.Unsigned(); | ||||
break; | break; | ||||
case DW_AT_call_line: | case DW_AT_call_line: | ||||
if (call_line == 0) | if (!call_line) | ||||
call_line = form_value.Unsigned(); | call_line = form_value.Unsigned(); | ||||
break; | break; | ||||
case DW_AT_call_column: | case DW_AT_call_column: | ||||
if (call_column == 0) | if (!call_column) | ||||
call_column = form_value.Unsigned(); | call_column = form_value.Unsigned(); | ||||
break; | break; | ||||
case DW_AT_frame_base: | case DW_AT_frame_base: | ||||
if (frame_base) { | if (frame_base) { | ||||
if (form_value.BlockData()) { | if (form_value.BlockData()) { | ||||
uint32_t block_offset = | uint32_t block_offset = | ||||
form_value.BlockData() - data.GetDataStart(); | form_value.BlockData() - data.GetDataStart(); | ||||
▲ Show 20 Lines • Show All 501 Lines • Show Last 20 Lines |