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 Leheyset output-radix 16 7030b9a7cSGreg Leheyset height 70 8030b9a7cSGreg Leheyset width 120 9030b9a7cSGreg Lehey 10030b9a7cSGreg Lehey# Connect to remote target 11030b9a7cSGreg Leheydefine tr 12030b9a7cSGreg Leheyset remotebaud 9600 13030b9a7cSGreg Lehey# Remote debugging port 14030b9a7cSGreg Leheytarget remote /dev/cuaa0 15030b9a7cSGreg Leheyend 16030b9a7cSGreg Lehey 17030b9a7cSGreg Lehey# Get symbols from klds. This is a little fiddly, but very fast. 18030b9a7cSGreg Leheydefine getsyms 19030b9a7cSGreg Leheykldstat 20030b9a7cSGreg Leheyecho Select the list above with the mouse, paste into the screen\n 21030b9a7cSGreg Leheyecho and then press ^D. Yes, this is annoying.\n 22030b9a7cSGreg Lehey# This should be the path of the real modules directory. 23030b9a7cSGreg Leheyshell asf modules/src/FreeBSD/5-CURRENT-ZAPHOD/src/sys/modules 24030b9a7cSGreg Leheysource .asf 25030b9a7cSGreg Leheyend 26030b9a7cSGreg Lehey 27030b9a7cSGreg Lehey# End of things you're likely to need to change. 28030b9a7cSGreg Lehey 29030b9a7cSGreg Leheyset remotetimeout 1 30030b9a7cSGreg Leheyset complaints 1 31030b9a7cSGreg Leheyset print pretty 32030b9a7cSGreg Leheydir ../../.. 33030b9a7cSGreg Leheydocument tr 34030b9a7cSGreg LeheyAttach to a remote kernel via serial port 35030b9a7cSGreg Leheyend 36030b9a7cSGreg Lehey 37030b9a7cSGreg Leheysource gdbinit.kernel 38030b9a7cSGreg Leheysource gdbinit.vinum 39*b38d4c01SGreg Leheysource gdbinit.machine 40030b9a7cSGreg Lehey 41*b38d4c01SGreg Leheyecho Ready to go. Enter 'tr' to connect to remote target 42*b38d4c01SGreg Leheyecho and 'getsyms' after connection to load kld symbols. 43