How to break into kernel debugger

Winston wyt168 at gmail.com
Fri Nov 17 19:32:21 UTC 2006


I've set up kgdb for remote debugging over serial lines (null modem)
between two machines. I can get into the debugger when I boot the
target machine with "boot -d" and from the debugging machine with the
command "target remote /dev/cuad1". However, once I let the debugger
go with "continue" command, I can't break into the debugger anymore.
If hit ctl-c once on the debugging machine, there is no response. Hit
it again, I got:
^C
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) n
The gdb doc mentioned this and stated:
"Whenever gdb is waiting for the remote program, if you type the
interrupt character
(often Ctrl-c), gdb attempts to stop the program. This may or may not
succeed, depending
in part on the hardware and the serial drivers the remote system uses."
However, it doesn't offer a suggestion as to how to make it work.
I tried to set remotebreak to on with:
set remotebreak on;
But it still doesn't work.
I search this mailing list and it appears there was an earlier thread
"escape to kernel debugger" that enquired about the same thing.
However, it was a while ago, and the options mentioned in the thread
are not in the config file anymore.
Any suggestions?


More information about the freebsd-hackers mailing list