tamur updated this revision to Diff 189415.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59004/new/
https://reviews.llvm.org/D59004
Files:
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
@@ -166,6 +166,7 @@
case DW_FORM_ref_sig8:
llvm_unreachable("Unhandled atom form");
+ case DW_FORM_addrx:
case DW_FORM_string:
case DW_FORM_block:
case DW_FORM_block1:
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -681,6 +681,7 @@
return 1;
switch (a_form) {
case DW_FORM_addr:
+ case DW_FORM_addrx:
case DW_FORM_flag:
case DW_FORM_data1:
case DW_FORM_data2:
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -326,6 +326,7 @@
break;
// signed or unsigned LEB 128 values
+ case DW_FORM_addrx:
case DW_FORM_sdata:
case DW_FORM_udata:
case DW_FORM_ref_udata:
@@ -456,6 +457,7 @@
case DW_AT_high_pc:
if (form_value.Form() == DW_FORM_addr ||
+ form_value.Form() == DW_FORM_addrx ||
form_value.Form() == DW_FORM_GNU_addr_index) {
hi_pc = form_value.Address();
} else {
@@ -1031,7 +1033,8 @@
if (GetAttributeValue(dwarf2Data, cu, DW_AT_high_pc, form_value, nullptr,
check_specification_or_abstract_origin)) {
dw_form_t form = form_value.Form();
- if (form == DW_FORM_addr || form == DW_FORM_GNU_addr_index)
+ if (form == DW_FORM_addr || form == DW_FORM_addrx ||
+ form == DW_FORM_GNU_addr_index)
return form_value.Address();
// DWARF4 can specify the hi_pc as an <offset-from-lowpc>
Index: lldb/source/Expression/DWARFExpression.cpp
===================================================================
--- lldb/source/Expression/DWARFExpression.cpp
+++ lldb/source/Expression/DWARFExpression.cpp
@@ -514,6 +514,10 @@
s->Printf("DW_OP_GNU_addr_index(0x%" PRIx64 ")",
m_data.GetULEB128(&offset));
break;
+ case DW_OP_addrx:
+ s->Printf("DW_OP_addrx(0x%" PRIx64 ")",
+ m_data.GetULEB128(&offset));
+ break;
case DW_OP_GNU_const_index: // 0xfc
s->Printf("DW_OP_GNU_const_index(0x%" PRIx64 ")",
m_data.GetULEB128(&offset));
@@ -877,6 +881,7 @@
return 8;
// All opcodes that have a single ULEB (signed or unsigned) argument
+ case DW_OP_addrx: // 0xa1 1 ULEB128 index
case DW_OP_constu: // 0x10 1 ULEB128 constant
case DW_OP_consts: // 0x11 1 SLEB128 constant
case DW_OP_plus_uconst: // 0x23 1 ULEB128 addend
@@ -957,7 +962,7 @@
return op_file_addr;
else
++curr_op_addr_idx;
- } else if (op == DW_OP_GNU_addr_index) {
+ } else if (op == DW_OP_GNU_addr_index || op == DW_OP_addrx) {
uint64_t index = m_data.GetULEB128(&offset);
if (curr_op_addr_idx == op_addr_idx) {
if (!m_dwarf_cu) {
@@ -2902,13 +2907,14 @@
} break;
//----------------------------------------------------------------------
- // OPCODE: DW_OP_GNU_addr_index
+ // OPCODE: DW_OP_addrx (DW_OP_GNU_addr_index is the legacy name.)
// OPERANDS: 1
// ULEB128: index to the .debug_addr section
// DESCRIPTION: Pushes an address to the stack from the .debug_addr
// section with the base address specified by the DW_AT_addr_base attribute
// and the 0 based index is the ULEB128 encoded index.
//----------------------------------------------------------------------
+ case DW_OP_addrx:
case DW_OP_GNU_addr_index: {
if (!dwarf_cu) {
if (error_ptr)
@@ -3194,6 +3200,7 @@
case DW_OP_call_ref:
size = dwarf_ref_size;
break;
+ case DW_OP_addrx:
case DW_OP_piece:
case DW_OP_plus_uconst:
case DW_OP_regx:
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits