kernel serial debugging question
Background:
-----------
In the past, I have had to use the kernel serial debugger with the 2.2.14 kernel.
The steps I followed (if my notes are correct) were:
- in "make menuconfig", within "<Kernel Hacking>", select "<Kernel support for GDB>"
- pass the additional options "gdb gdbttyS=1 gdbbaud=115200" to loadlin
- wait for the message "Waiting for connection from remote gdb on ttyS1"
My question:
------------
Has any of this changed with the 2.4.x kernel? I'm currently playing with 2.4.19-pre9. Is there a "serial debugger" patch that has to be applied first, or is this support normally built-in?
The reason I ask is because I don't see the option "Kernel support for GDB", which leads me to think that maybe this functionality actually came from a patch that was applied on top of 2.2.14.
While I'm at it: is there a "better", or perhaps a "more popular" method of debugging the kernel?
Thanks,
Stephane Charette
Quoted 7 lines · Stephane Charette
Background:
-----------In the past, I have had to use the kernel serial debugger with the 2.2.14 kernel.
It's an external patch. From http://kgdb.sourceforge.net/
I have kgdb patches for all kernels back to 2.4.0-test. Some of those can be found by poking around in
http://www.zip.com.au/~akpm/linux/patches/.
Quoted 6 lines · Stephane Charette
My question:
------------Has any of this changed with the 2.4.x kernel? I'm currently playing with 2.4.19-pre9. Is there a "serial debugger" patch that has to be applied first, or is this support normally built-in?
I've set up kernel remote debugging for 2.4.18 not so far ago. The procedure is the same as for the 2.2.* series. You should simply use the patch for the kernel version you use.
Quoted 6 lines
The reason I ask is because I don't see the option "Kernel support for GDB", which leads me to think that maybe this functionality actually came from a patch that was applied on top of 2.2.14.
While I'm at it: is there a "better", or perhaps a "more popular" method of debugging the kernel?
On my development machine I've set up one kernel with the kgdb internal debugger, one kernel with the gdb-patch and one unpatched kernel with the usual debugging stuff enabled ( all kernels of the same version - of course ). Which kernel to run depends on the kind of problem to solve, and is IMHO more a question of personal taste.
Regards
Frank