summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_getlocation.c
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2017-11-02 16:24:41 +0100
committerMark Wielaard <mark@klomp.org>2017-11-10 16:36:01 +0100
commitafda91cb2e68f3817e551ad58ad4bbe9fc0da403 (patch)
tree316188b6d67b3bc485c4ec20d3a80dab7e2be1b5 /libdw/dwarf_getlocation.c
parent7286e5c5de53840126b4046a46442872a3b00692 (diff)
libdw: Handle DW_OP_GNU_variable_value.
Handle DW_OP_GNU_variable_value in dwarf_getlocation[_attr,_die]. DW_OP_GNU_variable_value takes one argument a DIE reference that describes a value given by a location of const_value attribute. To test handling of the new operand the varlocs test is adapted to print out all DIEs and attributes with expressions or location lists (the original varlocs test only prints out variables and arguments of function DIEs). Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw/dwarf_getlocation.c')
-rw-r--r--libdw/dwarf_getlocation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c
index c59546e0..86a9ae7f 100644
--- a/libdw/dwarf_getlocation.c
+++ b/libdw/dwarf_getlocation.c
@@ -323,6 +323,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order,
break;
case DW_OP_call_ref:
+ case DW_OP_GNU_variable_value:
/* DW_FORM_ref_addr, depends on offset size of CU. */
if (dbg == NULL || __libdw_read_offset_inc (dbg, sec_index, &data,
ref_size,