Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kgdb expected to work?



I'm doing something a little weird, so before trying to debug it (in specific), I wanted to see if anyone actually _uses_ kgdb successfully at all these days. Note that I haven't actually used kgdb since dual-serial-port boxes were the norm (probably 2002 or so), so I'm quite rusty.

I'm running some VMs under VMWare Fusion on MacOSX - and it just occurred to me that I might be able to debug using kgdb under serial port emulation. A couple folks gave me some pointers, and I have things kind-of-sort-of working in that I can attach GDB and "continue" execution of the kernel.

However!

when I launch the kernel (basically GENERIC with DDB removed and KGDB enabled at 115200) with "boot -d", I get the following on console:

kgdb waiting...fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c057224c cs 8 eflags 296 cr2 0 ilevel 8


...I can actually attach gdb at that point, which I do. (This is a cross-gdb running under MacOS, built with MKCROSSGDB=yes from the same src tree as the kernel)

Like so:

(gdb) set remotebreak 1
(gdb) set remotebaud 115200
(gdb) target remote 127.0.0.1:12303
(gdb)

(port 12303 is where I have the emulated serial port listening via tcp).

If I type "continue", the kernel seems to run. However, if I try to set a breakpoint, I get a trap on console when I would expect the breakpoint to hit, and gdb never returns. I also can't seem to manually break. I should also note that I get the same behavior in 5.1 and -current.

So...

Does KGDB actually still work for people? Is there anything else anyone can suggest to try? I'm not great with gdb, so it's entirely possible I'm doing something braindead.

Thanks!
+j





Home | Main Index | Thread Index | Old Index