From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] readelf: Format offset as DIE index (hex).
Date: Thu, 28 Dec 2017 23:48:00 -0000 [thread overview]
Message-ID: <20171228234810.18209-1-mark@klomp.org> (raw)
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 | 5 +++++
src/readelf.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 994b1e17..9d6ec830 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/readelf.c b/src/readelf.c
index ca979e3c..ee9c7e1d 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -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;
}
--
2.14.3
reply other threads:[~2017-12-28 23:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171228234810.18209-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).