Support for DW_OP_addrx and DW_FORM_addrx tags

DW_OP_addrx is the new name of DW_OP_GNU_addr_index, and DW_FORM_addrx
is the name of DW_FORM_addr_index in the Dwarf 5 standard. This is a small
step towards supporting Dwarf 5 in gdb.

Note: I could not find any tests specifically for *_GNU_addr_index, and
I did not add any new tests, please advise.
This commit is contained in:
Ali Tamur
2019-03-29 19:29:24 -07:00
parent 4a4153dfc9
commit 336d760da6
6 changed files with 44 additions and 10 deletions

View File

@@ -634,6 +634,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
result_val = value_from_ulongest (address_type, result);
break;
case DW_OP_addrx:
case DW_OP_GNU_addr_index:
op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
result = this->get_addr_index (uoffset);