From: justin Date: Thu, 8 Jan 2009 02:19:45 +0000 (-0500) Subject: Cleanup X-Git-Url: https://gitweb.dragonflybsd.org/ikiwiki.git/commitdiff_plain/b05e3151bcc48ecc64e139ea40a0fe9fcc0b1d26 Cleanup --- diff --git a/docs/developer/C_Development_Under_DragonFly_BSD-Volume_3_Developing_the_DragonFly_BSD_Kernel.mdwn b/docs/developer/C_Development_Under_DragonFly_BSD-Volume_3_Developing_the_DragonFly_BSD_Kernel.mdwn index e913ce7f..c15c5718 100644 --- a/docs/developer/C_Development_Under_DragonFly_BSD-Volume_3_Developing_the_DragonFly_BSD_Kernel.mdwn +++ b/docs/developer/C_Development_Under_DragonFly_BSD-Volume_3_Developing_the_DragonFly_BSD_Kernel.mdwn @@ -1,52 +1,99 @@ -# C Development Under DragonFly BSD Volume 3: Developing the DragonFly BSD Kernel - -<> - -## Working on the kernel - - -* Discuss how kernel development differs from userland development - -* What subsystems do we provide - -* Where are various files - -* How to debug a kernel - -* Overview, exercises and examples - - - -### Section Notes - -### Debugging threads in a kernel - -#### Notes from a thread which should be converted - - - - :Richard Nyberg wrote: - :> I often use gdb's proc command to switch between different processes - :> when debugging kernel cores. Now I want to debug a kernel thread - :> and it doesn't seem to work. Does anyone know how to switch to a - :> kernel thread? Maybe proc could be tweaked to work for threads too. - :> - :Replying to myself... - : - :I RTFS and it looked like proc should work with kernel threads. - :The problem seems to be that the threads td_pcb is invalid. - : - :Example: - - Matt 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. - +# C Development Under DragonFly BSD Volume 3: Developing the DragonFly BSD Kernel + + +[[!toc levels=2]] + + + + +## Working on the kernel + + + + +* Discuss how kernel development differs from userland development + + +* What subsystems do we provide + + +* Where are various files + + +* How to debug a kernel + + +* Overview, exercises and examples + + + + + + + +### Section Notes + + + +### Debugging threads in a kernel + + + +#### Notes from a thread which should be converted + + + + + + + + :Richard Nyberg wrote: + + :> I often use gdb's proc command to switch between different processes + + :> when debugging kernel cores. Now I want to debug a kernel thread + + :> and it doesn't seem to work. Does anyone know how to switch to a + + :> kernel thread? Maybe proc could be tweaked to work for threads too. + + :> + + :Replying to myself... + + : + + :I RTFS and it looked like proc should work with kernel threads. + + :The problem seems to be that the threads td_pcb is invalid. + + : + + :Example: + + + + Matt 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. + + +