1*030b9a7cSGreg Lehey# $FreeBSD$
2*030b9a7cSGreg Lehey# .gdbinit file for remote serial debugging.
3*030b9a7cSGreg Lehey# see gdbinit(9) for further details.
4*030b9a7cSGreg Lehey#
5*030b9a7cSGreg Lehey# The following lines (down to "end" comment) may need to be changed
6*030b9a7cSGreg Leheyfile kernel.debug
7*030b9a7cSGreg Leheyset output-radix 16
8*030b9a7cSGreg Leheyset height 70
9*030b9a7cSGreg Leheyset width 120
10*030b9a7cSGreg Lehey
11*030b9a7cSGreg Lehey# Connect to remote target
12*030b9a7cSGreg Leheydefine tr
13*030b9a7cSGreg Leheyset remotebaud 9600
14*030b9a7cSGreg Lehey# Remote debugging port
15*030b9a7cSGreg Leheytarget remote /dev/cuaa0
16*030b9a7cSGreg Leheyend
17*030b9a7cSGreg Lehey
18*030b9a7cSGreg Lehey# Get symbols from klds.  This is a little fiddly, but very fast.
19*030b9a7cSGreg Leheydefine getsyms
20*030b9a7cSGreg Leheykldstat
21*030b9a7cSGreg Leheyecho Select the list above with the mouse, paste into the screen\n
22*030b9a7cSGreg Leheyecho and then press ^D.  Yes, this is annoying.\n
23*030b9a7cSGreg Lehey# This should be the path of the real modules directory.
24*030b9a7cSGreg Leheyshell asf modules/src/FreeBSD/5-CURRENT-ZAPHOD/src/sys/modules
25*030b9a7cSGreg Leheysource .asf
26*030b9a7cSGreg Leheyend
27*030b9a7cSGreg Lehey
28*030b9a7cSGreg Lehey# End of things you're likely to need to change.
29*030b9a7cSGreg Lehey
30*030b9a7cSGreg Leheyset remotetimeout 1
31*030b9a7cSGreg Leheyset complaints 1
32*030b9a7cSGreg Leheyset print pretty
33*030b9a7cSGreg Leheydir ../../..
34*030b9a7cSGreg Leheydocument tr
35*030b9a7cSGreg LeheyAttach to a remote kernel via serial port
36*030b9a7cSGreg Leheyend
37*030b9a7cSGreg Lehey
38*030b9a7cSGreg Leheysource gdbinit.kernel
39*030b9a7cSGreg Leheysource gdbinit.vinum
40*030b9a7cSGreg Lehey
41*030b9a7cSGreg Lehey# Attach to the remote kernel
42*030b9a7cSGreg Leheytr
43*030b9a7cSGreg Lehey# And get the symbols from klds
44*030b9a7cSGreg Leheygetsyms
45