summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2010-09-09 23:16:18 -0700
committerRoland McGrath <[email protected]>2010-09-09 23:16:18 -0700
commita4e6b968146b9b2e9879dc4bc0c1f0510f3abf40 (patch)
treea125ac30eb7a0b7f2be77dd3241b274d9d36b560 /src/readelf.c
parent4f167992ce148c3a075f1a88ec90a922ab334f7a (diff)
parent932585d2385c9d4e5686e4ddc9ba30c68172d7f3 (diff)
Merge branch 'roland/implicit-ptr'
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/readelf.c b/src/readelf.c
index 2b7f9f2f..81ef6a9f 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -3975,6 +3975,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
[DW_OP_bit_piece] = "bit_piece",
[DW_OP_implicit_value] = "implicit_value",
[DW_OP_stack_value] = "stack_value",
+ [DW_OP_GNU_implicit_pointer] = "GNU_implicit_pointer",
};
if (len == 0)
@@ -4217,6 +4218,28 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
offset += 1 + (data - start);
break;
+ case DW_OP_GNU_implicit_pointer:
+ /* DIE offset operand. */
+ start = data;
+ NEED (ref_size + 1);
+ if (ref_size == 4)
+ addr = read_4ubyte_unaligned (dbg, data);
+ else
+ {
+ assert (ref_size == 8);
+ addr = read_8ubyte_unaligned (dbg, data);
+ }
+ data += ref_size;
+ /* Byte offset operand. */
+ get_sleb128 (sleb, data); /* XXX check overrun */
+
+ printf ("%*s[%4" PRIuMAX "] %s %#" PRIxMAX ", %+" PRId64 "\n",
+ indent, "", (intmax_t) offset,
+ known[op], (uintmax_t) addr, sleb);
+ CONSUME (data - start);
+ offset += 1 + (data - start);
+ break;
+
default:
/* No Operand. */
if (op < sizeof known / sizeof known[0] && known[op] != NULL)