This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] readelf: Print arguments to DW_OP_call2 and DW_OP_call4 as DIE offsets.


That makes it easier to follow the call to the actual DIE.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 src/ChangeLog | 5 +++++
 src/readelf.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index c56c323..364a30f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-07  Mark Wielaard  <mark@klomp.org>
+
+	* readelf.c (print_ops): Print arguments to DW_OP_call2 and
+	DW_OP_call4 as DIE offsets.
+
 2017-11-21  Mark Wielaard  <mark@klomp.org>
 
 	* readelf.c (attr_callback): Print attribute name and form in error
diff --git a/src/readelf.c b/src/readelf.c
index a9168d1..34e9a49 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -4323,7 +4323,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
 
 	case DW_OP_call2:
 	  NEED (2);
-	  printf ("%*s[%4" PRIuMAX "] %s %" PRIu16 "\n",
+	  printf ("%*s[%4" PRIuMAX "] %s [%6" PRIx16 "]\n",
 		  indent, "", (uintmax_t) offset, op_name,
 		  read_2ubyte_unaligned (dbg, data));
 	  CONSUME (2);
@@ -4332,7 +4332,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
 
 	case DW_OP_call4:
 	  NEED (4);
-	  printf ("%*s[%4" PRIuMAX "] %s %" PRIu32 "\n",
+	  printf ("%*s[%4" PRIuMAX "] %s [%6" PRIx32 "]\n",
 		  indent, "", (uintmax_t) offset, op_name,
 		  read_4ubyte_unaligned (dbg, data));
 	  CONSUME (4);
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]