kgdb
[Top] [All Lists]

kgdb experience and simple fix

To: kgdb@xxxxxxxxxxx
Subject: kgdb experience and simple fix
From: Peng Dai <dai@xxxxxxxxxxx>
Date: Tue, 13 Jun 2000 17:43:53 -0400
Organization: Mission Critical Linux
Sender: owner-kgdb@xxxxxxxxxxx
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


<Prev in Thread] Current Thread [Next in Thread>
  • kgdb experience and simple fix, Peng Dai <=