From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Add dump_die
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20191201090811.GA31310@delia> (raw)
Hi,
Add dump_die debug function, that we can easily call during a debug session:
...
(gdb) call dump_die (die)
5b X 0 0 short int base_type
...
Committed to trunk.
Thanks,
- Tom
Add dump_die
2019-11-30 Tom de Vries <tdevries@suse.de>
* dwz.c (USED): Define.
(dump_die): New function.
---
dwz.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dwz.c b/dwz.c
index d417c94..f68a81c 100644
--- a/dwz.c
+++ b/dwz.c
@@ -119,9 +119,11 @@
#if defined __GNUC__
# define FORCE_INLINE __attribute__((always_inline))
# define UNUSED __attribute__((unused))
+# define USED __attribute__((used))
#else
# define FORCE_INLINE
# define UNUSED
+# define USED
#endif
#define obstack_chunk_alloc malloc
@@ -4172,6 +4174,13 @@ dump_die_with_indent (int indent, dw_die_ref die)
fprintf (stderr, "\n");
}
+/* Dump DIE to stderr. */
+void USED
+dump_die (dw_die_ref die)
+{
+ dump_die_with_indent (0, die);
+}
+
/* Dump DIE tree at tree depth DEPTH. */
static void
dump_dies (int depth, dw_die_ref die)
reply other threads:[~2019-12-01 9:08 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=20191201090811.GA31310@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
/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).