aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbinit.in
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-10-06 22:23:18 +0000
committerDoug Evans <dje@google.com>2008-10-06 22:23:18 +0000
commitd97bc12be0807f1de4cbddd62dedc9a6e88a54d9 (patch)
tree18bd0ad65f932cc97298a57ced61db673663aff9 /gdb/gdbinit.in
parent4545259105cd6f772b6d733e06f32d4e872e82c5 (diff)
downloadgdb-d97bc12be0807f1de4cbddd62dedc9a6e88a54d9.zip
gdb-d97bc12be0807f1de4cbddd62dedc9a6e88a54d9.tar.gz
gdb-d97bc12be0807f1de4cbddd62dedc9a6e88a54d9.tar.bz2
* dwarf2read.c (dwarf2_die_debug): New static global.
(dump_die_shallow): Renamed from dump_die, New args f, indent. Print to specified file, indented by the specified amount. (dump_die_for_error): New fn. Point all existing callers of dump_die here. (dump_die_die_1,dump_die): New fns, replaces ... (dump_die_list): ... deleted. (read_die_and_children_1): Old contents of read_die_and_children moved here. (read_die_and_children): Rewrite. (read_die_and_siblings): Call read_die_and_children_1 instead of read_die_and_children. (_initialize_dwarf2_read): New option "debug dwarf2-die". * gdbinit.in (pdie): New macro. * doc/gdb.texinfo (set debug dwarf2-die): Document it.
Diffstat (limited to 'gdb/gdbinit.in')
-rw-r--r--gdb/gdbinit.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/gdbinit.in b/gdb/gdbinit.in
index 1a080dc..ffb7f53 100644
--- a/gdb/gdbinit.in
+++ b/gdb/gdbinit.in
@@ -15,3 +15,20 @@ dir @srcdir@/../bfd
dir @srcdir@
dir .
set prompt (top-gdb)
+
+define pdie
+ if $argc == 1
+ call dump_die ($arg0, 1)
+ else
+ if $argc == 2
+ call dump_die ($arg0, $arg1)
+ else
+ printf "Syntax: pdie die [depth]\n"
+ end
+ end
+end
+
+document pdie
+Pretty print a DWARF DIE.
+Syntax: pdie die [depth]
+end