freebsd-dev/tools/debugscripts/dot.gdbinit
Brian Feldman afdc68c42f Add a "-f" flag for asf(8) which performs a search to find the each module
no matter where in the directory structure it may be.  Use this and the "-k"
flag in the generated gdbinit files so that the "getsyms" function in gdb
requires no user intervention to run and will find every module if they're
in the kernel build's module directory.  This is still quite useful for
cases where gdb knows that the path for some modules is /boot/kernel and
others are in the object directory for /usr/src/sys/$ARCH/compile/kernel.

Approved by:	grog
2003-11-04 06:38:37 +00:00

40 lines
867 B
Plaintext

# $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
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
# This should be the path of the real modules directory.
shell asf -f -k MODPATH
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
source gdbinit.machine
echo Ready to go. Enter 'tr' to connect to remote target\n
echo and 'getsyms' after connection to load kld symbols.\n