views:

55

answers:

1

Hi,

I'm using gdb to connect to a 2.6.31.13 linux kernel patched with KGDB over Ethernet, and when I try to detach the debugger I get this:

(gdb) quit
A debugging session is active.

 Inferior 1 [Remote target] will be killed.

Quit anyway? (y or n) y
Bogus trace status reply from target: E22

after that the session is still open, I can keep going on and on with ctrl+d, and the debugger doesn't exit.

I've searched for that message in google and there are just 5 results (and none of them are useful :-/ ).

Any idea of what could it be and how to fix it?

+1  A: 

If you cleared all breakpoints on the target and "C"ontinued from the latest breakpoint (assuming that the target code didn't crash, etc.), I think you'll be safe: when running, kgdb won't be talking to your gdb anyway, since if I recall, it only handles the link when stopped (in a breakpoint or exception) awaiting for commands. A few Ctrl-C in a fast sequence if needed to get control back in gdb, then "q", and that's it.

That's at least my experience when debugging ko's...

I suspect gdb is saying this because it doesn't realize that it is talking to a kgdb rather than to a remote gdb server. I don't imagine kgdb accepting to kill a kernel thread because the debugger was exited, anyway!

Hmmm, afterthought: You're talking about kgdb 'lite', the one now part of the kernel tree, are you? Because that's the only one I have experience with...

PS on June, 3:

I had never seen the exact message you mentioned until I moved to the 2.6.32 kernel (as part of the migration of my dev and target machines to Lucid). And then, surprise, I ran into it too. Here, it seems to happen in hopeless situations (like a segfault or kgbd seemingly running away after missing a breakpoint or single step). The only cure I have found so far was to pkill ddd (gdb) on the dev machine and reboot the target. But the good news is that the kgdb in 2.6.32 seems to be quite more stable than the one in Karmic (2.6.31).

filofel
I think it should be the full one, because I had to patch the kernel to get On Ethernet support, the "lite" only has serial port, I think...
fortran
Hmmm, I wonder. I think Jason Wessel, the kgdb maintener, has had the Over Ethenet driver patch ready for a bunch of time, but didn't integrate it yet into the kernel tree. The following is an excerpt from a msg on kgdb-bugreport, dated Feb 4, 2010:> option, say, try kgdb over ethernet, but I saw in recent kernels> kgdboe patch is not existing, can someone tell me why this patch > is removed?Or where can I get it? Thank you.kgdboe has never been merged to the mainline.The patches for it do exist in the kgdb git archive.(The answer above was from Jason, kgdb developer).
filofel
And yes, regular kgdb currently does serial only. The OE patch for it certainly exists, prolly in the sourceforge repository, but didn't exist in the kernel tree in Feb 2010 i.e. at a time when early 2.6.4 was being put together). So I don't know whether you have the regular kernel kgdb with some additions, like some backport incorporating an OE polled driver or what?And I don't know from any source that the "old" kgdb has ever been updated to be ported to 1.6.31, that is a fairly recent kernel. Remember where you got your kgdb and/or OE patch from?
filofel