readelf: print actual DIE offsets of DW_OP_GNU_<type> ops.
authorMark Wielaard <mjw@redhat.com>
Tue, 9 Jul 2013 21:09:38 +0000 (23:09 +0200)
committerMark Wielaard <mjw@redhat.com>
Sat, 13 Jul 2013 21:06:55 +0000 (23:06 +0200)
commit1ab6e78250293926e90bfe011ff7dc0d7bf311b7
treed5844be60a48b1c0084c27ba9d72cfde3f5514f1
parent352302209525504ae4b5f3528be6516f5e1190c3
readelf: print actual DIE offsets of DW_OP_GNU_<type> ops.

Like DW_OP_GNU_parameter_ref the DW_OP_GNU type conversion ops
DW_OP_GNU_const_type, DW_OP_GNU_regval_type, DW_OP_GNU_deref_type,
DW_OP_GNU_convert and DW_OP_GNU_reinterpret take a CU relative offset
to a DIE (in these cases a DW_TAG_base_type). So handle the DIE offsets
just like in the DW_OP_GNU_parameter_ref case by adding the cu->start
if known (and -U hasn't been given). For DW_OP_GNU_convert and
DW_OP_GNU_reinterpret handle zero specially since it means to "untype"
the result and so isn't an actual DIE reference.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/readelf.c