1030b9a7cSGreg Lehey# $FreeBSD$ 2030b9a7cSGreg Lehey# .gdbinit file for remote serial debugging. 3030b9a7cSGreg Lehey# see gdbinit(9) for further details. 4030b9a7cSGreg Lehey# 5030b9a7cSGreg Lehey# The following lines (down to "end" comment) may need to be changed 6030b9a7cSGreg Leheyfile kernel.debug 7030b9a7cSGreg Leheyset output-radix 16 8030b9a7cSGreg Leheyset height 70 9030b9a7cSGreg Leheyset width 120 10030b9a7cSGreg Lehey 11030b9a7cSGreg Lehey# Connect to remote target 12030b9a7cSGreg Leheydefine tr 13030b9a7cSGreg Leheyset remotebaud 9600 14030b9a7cSGreg Lehey# Remote debugging port 15030b9a7cSGreg Leheytarget remote /dev/cuaa0 16030b9a7cSGreg Leheyend 17030b9a7cSGreg Lehey 18030b9a7cSGreg Lehey# Get symbols from klds. This is a little fiddly, but very fast. 19030b9a7cSGreg Leheydefine getsyms 20030b9a7cSGreg Leheykldstat 21030b9a7cSGreg Leheyecho Select the list above with the mouse, paste into the screen\n 22030b9a7cSGreg Leheyecho and then press ^D. Yes, this is annoying.\n 23030b9a7cSGreg Lehey# This should be the path of the real modules directory. 24030b9a7cSGreg Leheyshell asf modules/src/FreeBSD/5-CURRENT-ZAPHOD/src/sys/modules 25030b9a7cSGreg Leheysource .asf 26030b9a7cSGreg Leheyend 27030b9a7cSGreg Lehey 28030b9a7cSGreg Lehey# End of things you're likely to need to change. 29030b9a7cSGreg Lehey 30030b9a7cSGreg Leheyset remotetimeout 1 31030b9a7cSGreg Leheyset complaints 1 32030b9a7cSGreg Leheyset print pretty 33030b9a7cSGreg Leheydir ../../.. 34030b9a7cSGreg Leheydocument tr 35030b9a7cSGreg LeheyAttach to a remote kernel via serial port 36030b9a7cSGreg Leheyend 37030b9a7cSGreg Lehey 38030b9a7cSGreg Leheysource gdbinit.kernel 39030b9a7cSGreg Leheysource gdbinit.vinum 40030b9a7cSGreg Lehey 41030b9a7cSGreg Lehey# Attach to the remote kernel 42030b9a7cSGreg Leheytr 43030b9a7cSGreg Lehey# And get the symbols from klds 44030b9a7cSGreg Leheygetsyms 45