* [committed] Add dump_die
@ 2019-01-01 0:00 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz, jakub
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-01 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [committed] Add dump_die Tom de Vries
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).