summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2012-07-20 00:09:56 +0200
committerMark Wielaard <[email protected]>2012-07-26 10:21:39 +0200
commit515fba93a55d04d21474d1454396067825f221ce (patch)
treec29ebd669153c8ea09623d6210610dffe6ec0acb /src/readelf.c
parentc4010b8194a458d4e12f86c0b05327126199ff60 (diff)
Add DW_OP_GNU_parameter_ref to dwarf.h and handle it in readelf.
DW_OP_GNU_parameter_ref takes as operand a 4 byte CU relative reference to the abstract optimized away DW_TAG_formal_parameter. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/readelf.c b/src/readelf.c
index ab76a1fa..93f56c3b 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -4403,6 +4403,18 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
offset += 1 + (data - start);
break;
+ case DW_OP_GNU_parameter_ref:
+ /* 4 byte CU relative reference to the abstract optimized away
+ DW_TAG_formal_parameter. */
+ NEED (4);
+ printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "]\n",
+ indent, "", (uintmax_t) offset, op_name,
+ (uintmax_t) read_4ubyte_unaligned (dbg, data));
+ CONSUME (4);
+ data += 4;
+ offset += 5;
+ break;
+
default:
/* No Operand. */
if (op < sizeof known / sizeof known[0] && known[op] != NULL)