]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf: Format offset as DIE index (hex).
authorMark Wielaard <mark@klomp.org>
Thu, 28 Dec 2017 23:46:19 +0000 (00:46 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 28 Dec 2017 23:46:19 +0000 (00:46 +0100)
That makes it so much easier to find the actual DIE offset in the output.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c

index 994b1e17b748617666c0210b15c46aabfb1880c3..9d6ec8304e482dcbbd84d5035b7276280e571319 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-28  Mark Wielaard  <mark@klomp.org>
+
+       * readelf.c (print_debug_units): Print DIE offset in error message
+       as hex.
+
 2017-12-18  Mark Wielaard  <mark@klomp.org>
 
        * readelf.c (handle_notes_data): Don't use EXIT_FAILURE in error.
index ca979e3c6405c16dee78eb5b4db8d34fafd56bdc..ee9c7e1d7d67a98a33e9c930f23c0ee7fcb4ca3c 100644 (file)
@@ -6414,8 +6414,8 @@ print_debug_units (Dwfl_Module *dwflmod,
       if (unlikely (tag == DW_TAG_invalid))
        {
          if (!silent)
-           error (0, 0, gettext ("cannot get tag of DIE at offset %" PRIu64
-                                 " in section '%s': %s"),
+           error (0, 0, gettext ("cannot get tag of DIE at offset [%" PRIx64
+                                 "] in section '%s': %s"),
                   (uint64_t) offset, secname, dwarf_errmsg (-1));
          goto do_return;
        }