public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jose E.Marchesi <jemarch@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] libctf: dump header offsets into the debugging output
Date: Fri, 21 Jun 2019 12:13:00 -0000	[thread overview]
Message-ID: <20190621121354.11830.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=364620bf636a0a961892c9274616f8d5ad85eecc

commit 364620bf636a0a961892c9274616f8d5ad85eecc
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Wed Jun 19 12:23:38 2019 +0100

    libctf: dump header offsets into the debugging output
    
    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.

Diff:
---
 libctf/ChangeLog  | 5 +++++
 libctf/ctf-open.c | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 9fd9e66..9ff7cd4 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,10 @@
 2019-06-19  Nick Alcock <nick.alcock@oracle.com>
 
+	* ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
+	output.
+
+2019-06-19  Nick Alcock <nick.alcock@oracle.com>
+
 	* ctf-subr.c (_PAGESIZE): Remove.
 	(ctf_data_alloc): Likewise.
 	(ctf_data_free): Likewise.
diff --git a/libctf/ctf-open.c b/libctf/ctf-open.c
index b0d3ef6..df735ac 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;


                 reply	other threads:[~2019-06-21 12:13 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=20190621121354.11830.qmail@sourceware.org \
    --to=jemarch@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    --cc=gdb-cvs@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).