This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 3/5] libctf: dump header offsets into the debugging output
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: binutils at sourceware dot org
- Cc: jose dot marchesi at oracle dot com, indu dot bhagat at oracle dot com
- Date: Wed, 19 Jun 2019 13:11:19 +0100
- Subject: [PATCH 3/5] libctf: dump header offsets into the debugging output
- References: <20190619121121.10478-1-nick.alcock@oracle.com>
This is an essential first piece of info needed to debug both libctf
writing and reading problems, and we weren't recording it anywhere!
(This is a short-term fix: fairly soon, we will record all of this in a
form that outlives ctf_bufopen, and then ctf_dump() will be able to dump
it like it can everything else.)
libctf/
* ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
output.
---
libctf/ctf-open.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libctf/ctf-open.c b/libctf/ctf-open.c
index b0d3ef6205..df735acb40 100644
--- a/libctf/ctf-open.c
+++ b/libctf/ctf-open.c
@@ -1275,6 +1275,9 @@ ctf_bufopen (const ctf_sect_t *ctfsect, const ctf_sect_t *symsect,
if (foreign_endian)
flip_header (&hp);
+ ctf_dprintf ("header offsets: %x/%x/%x/%x/%x/%x/%x\n",
+ hp.cth_lbloff, hp.cth_objtoff, hp.cth_funcoff, hp.cth_varoff,
+ hp.cth_typeoff, hp.cth_stroff, hp.cth_strlen);
hdrsz = sizeof (ctf_header_t);
size = hp.cth_stroff + hp.cth_strlen;
--
2.21.0.237.gd0cfaa883d