summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/gdbinit.in
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
committerobrien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
commitc9ab9ae440a8066b2c2b85b157b1fdadcf09916a (patch)
tree086d9d6c8fbd4fc8fe4495059332f66bc0f8d12b /contrib/gcc/gdbinit.in
parent2ecfd8bd04b63f335c1ec6295740a4bfd97a4fa6 (diff)
downloadFreeBSD-src-c9ab9ae440a8066b2c2b85b157b1fdadcf09916a.zip
FreeBSD-src-c9ab9ae440a8066b2c2b85b157b1fdadcf09916a.tar.gz
Enlist the FreeBSD-CURRENT users as testers of what is to become Gcc 3.1.0.
These bits are taken from the FSF anoncvs repo on 1-Feb-2002 08:20 PST.
Diffstat (limited to 'contrib/gcc/gdbinit.in')
-rw-r--r--contrib/gcc/gdbinit.in102
1 files changed, 102 insertions, 0 deletions
diff --git a/contrib/gcc/gdbinit.in b/contrib/gcc/gdbinit.in
new file mode 100644
index 0000000..5fae918
--- /dev/null
+++ b/contrib/gcc/gdbinit.in
@@ -0,0 +1,102 @@
+define pr
+set debug_rtx ($)
+end
+
+document pr
+Print the full structure of the rtx that is $.
+Works only when an inferior is executing.
+end
+
+define prl
+set debug_rtx_list ($, debug_rtx_count)
+end
+
+document prl
+Print the full structure of all rtx insns beginning at $.
+Works only when an inferior is executing.
+Uses variable debug_rtx_count to control number of insns printed:
+ debug_rtx_count > 0: print from $ on.
+ debug_rtx_count < 0: print a window around $.
+
+There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
+it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
+end
+
+define pt
+set debug_tree ($)
+end
+
+document pt
+Print the full structure of the tree that is $.
+Works only when an inferior is executing.
+end
+
+define ptc
+output (enum tree_code) $.common.code
+echo \n
+end
+
+document ptc
+Print the tree-code of the tree node that is $.
+end
+
+define pdn
+output $.decl.name->identifier.pointer
+echo \n
+end
+
+document pdn
+Print the name of the decl-node that is $.
+end
+
+define ptn
+output $.type.name->decl.name->identifier.pointer
+echo \n
+end
+
+document ptn
+Print the name of the type-node that is $.
+end
+
+define prc
+output (enum rtx_code) $.code
+echo \ (
+output $.mode
+echo )\n
+end
+
+document prc
+Print the rtx-code and machine mode of the rtx that is $.
+end
+
+define pi
+print $.fld[0].rtx@7
+end
+
+document pi
+Print the fields of an instruction that is $.
+end
+
+define pbs
+set print_binding_stack ()
+end
+
+document pbs
+In cc1plus, print the current binding stack, frame by frame, up to and
+including the global binding level.
+end
+
+# Put breakpoints at exit and fancy_abort in case abort is mapped
+# to either fprintf/exit or fancy_abort.
+b fancy_abort
+
+# Make gdb complain about symbol reading errors. This is so that gcc
+# developers can see and fix bugs in gcc debug output.
+set complaints 20
+
+# Don't let abort actually run, as it will make
+# stdio stop working and therefore the `pr' command above as well.
+# Put this last because gcc does not reference it any more unless
+# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
+b exit
+b abort
OpenPOWER on IntegriCloud