DragonFly kernel List (threaded) for 2005-01
Re: debugging kernel threads
At Wed, 26 Jan 2005 20:01:26 +0100,
Richard Nyberg wrote:
> At Wed, 26 Jan 2005 10:04:41 -0800 (PST),
> Matthew Dillon wrote:
> > Theoretically you can give the 'proc' command a thread address (not a
> > proc address, a thread address) and it should switch to it.
> > But Joerg's recent upgrades of gdb seem to have broken some things
> > that had been working before.
> > Pure kernel threads do not have PCBs in the conventional sense. The
> > thread state is pushed onto the stack for the switch/restore instead.
> > Most of the pcb structure will be unused for a kernel thread.
> Well, from looking at the code, it seems to me that gdb tries to use
> the pcb in both cases (threads or processes). I'd be very grateful
> if this could be fixed. :)
I tried to hack the new gdb to support kernel threads but I gave up
after a while. I just don't understand the old gdb code :P
The good thing though, is that the old gdb still is buildable,
so I'm using that one for now.
For those who want to use it, just "cd /usr/src/gnu/usr.bin/binutils && make".