Hi,
I have been trying remote gdb kernel debugging. I found a couple
things worth mentioning here.
The boot time debug functionality is broken due to option parsing.
Also the gdb hook can be invoked earlier (after memory is initialized
though). The following is a simple fix, for init/main.c,
399c399
< if (!strcmp(line,"gdbttyS=")) {
---
> if (!strncmp(line,"gdbttyS=", 8)) {
403c403
< if (!strcmp(line,"gdbbaud=")) {
---
> if (!strncmp(line,"gdbbaud=", 8)) {
516a517,520
> #ifdef CONFIG_X86_REMOTE_DEBUG
> if (gdb_enter)
> gdb_hook(); /* right at boot time */
> #endif
546,549d549
< #ifdef CONFIG_X86_REMOTE_DEBUG
< if (gdb_enter)
< gdb_hook(); /* right at boot time */
< #endif
I found that I have to set the baudrate to 4800 to have a smooth
debugging session. Baud rates higher than this cause characters
to be dropped frequently and gdb to hang for seconds each time.
Of course my serial hardware does not support flow control, but
neither do most other standard PCs.
Regards,
--
Peng Dai
email: dai@xxxxxxxxxxx
Kernel Engineer and Database Specialist voice: (978)
446-9166 x276
Mission Critical Linux fax:
(978) 446-9470
100 Foot Of John Street
Lowell, MA 01852
http://www.missioncriticallinux.com
|