Re: debugging kernel threads

看板DFBSD_kernel作者時間21年前 (2005/01/28 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/5 (看更多)
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". -Richard
文章代碼(AID): #11-Wrj00 (DFBSD_kernel)
文章代碼(AID): #11-Wrj00 (DFBSD_kernel)