diff options
author | grog <grog@FreeBSD.org> | 2003-06-07 01:01:42 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2003-06-07 01:01:42 +0000 |
commit | df67c67a7d713e46f07ce7aaf4e009bee718ff44 (patch) | |
tree | e1e17464ea5d95bbb669c741100eec50b166a09a /tools/debugscripts/dot.gdbinit | |
parent | 486cd15b6d95138c20cd7849a492931e9e9de6b8 (diff) | |
download | FreeBSD-src-df67c67a7d713e46f07ce7aaf4e009bee718ff44.zip FreeBSD-src-df67c67a7d713e46f07ce7aaf4e009bee718ff44.tar.gz |
Add macros for kernel debugging. These have been around for a
while, and they will need some more tuning before they're really
useful, but at the moment they're better than nothing.
Indirectly reminded by: dwhite
Diffstat (limited to 'tools/debugscripts/dot.gdbinit')
-rw-r--r-- | tools/debugscripts/dot.gdbinit | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/debugscripts/dot.gdbinit b/tools/debugscripts/dot.gdbinit new file mode 100644 index 0000000..c150d64 --- /dev/null +++ b/tools/debugscripts/dot.gdbinit @@ -0,0 +1,44 @@ +# $FreeBSD$ +# .gdbinit file for remote serial debugging. +# see gdbinit(9) for further details. +# +# The following lines (down to "end" comment) may need to be changed +file kernel.debug +set output-radix 16 +set height 70 +set width 120 + +# Connect to remote target +define tr +set remotebaud 9600 +# Remote debugging port +target remote /dev/cuaa0 +end + +# Get symbols from klds. This is a little fiddly, but very fast. +define getsyms +kldstat +echo Select the list above with the mouse, paste into the screen\n +echo and then press ^D. Yes, this is annoying.\n +# This should be the path of the real modules directory. +shell asf modules/src/FreeBSD/5-CURRENT-ZAPHOD/src/sys/modules +source .asf +end + +# End of things you're likely to need to change. + +set remotetimeout 1 +set complaints 1 +set print pretty +dir ../../.. +document tr +Attach to a remote kernel via serial port +end + +source gdbinit.kernel +source gdbinit.vinum + +# Attach to the remote kernel +tr +# And get the symbols from klds +getsyms |