I'm trying to debug an AR7 kernel on a DG834G with a very recent trunk build. I've enabled remote debugging via:

make kernel_menuconfig: "kernel hacking" --> "Remote GDB kernel debugging"

I've also modified to the kernel boot cmdline and appended "nokgdb". In this way the debug kernel will boot normally, but if I want to debug it, I can pass a cmdline to the kernel from the ADAM2 serial interface via the "go" command that does not have this option.

Using the cross compiled gdb build within openwrt's tool chain, I can connect to the kernel:


 

$ cat gdb_commands.bat
shell echo -e "\003" > /dev/ttyUSB0
set remotebaud 115200
set remotebreak on
target remote /dev/ttyUSB0

$ gdb --command=gdb_commands.bat ./vmlinux

This is all fine and good... things work well up to this point. The problem occurs when I try to stop kernel execution using cntrl-c:  (ignore the No such file or directory, I was running gdb on another machine with only vmlinux present, the rest of the source tree was not)


 
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-redhat-linux --target=mipsel-linux-uclibc"...
0xffffffff9410b8b0 in breakinst () at arch/mips/kernel/gdb-stub.c:1068
1068    arch/mips/kernel/gdb-stub.c: No such file or directory.
        in arch/mips/kernel/gdb-stub.c
warning: shared library handler failed to enable breakpoint
(gdb) c
Continuing.

Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n)

Basically... I can't and I don't  know why. One suggestion was given here: http://lkml.org/lkml/2004/11/23/310

Anyone got any ideas? I'd really like to crack on with this since I'm trying to track down some acx-mac80211 bugs