Hello

        To debug a driver, I try to use Kgdb along with Gdb on a serial link 
between an host machine and the target one running the buggy driver.

        The context is : linux-3.1.5 & gdb-7.1

        The procedure I use is as follows :

- On the host, open a Minicom window to boot the target computer over the  
serial link ( say ttyS0 ). The boot parameters in the command line are

        kgdboc=ttyS0,19200 kgdbwait

The last messages printed on the Minicom window are what I expected :

Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0e: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial 0000:01:09.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
0000:01:09.0: ttyS1 at I/O 0xbc00 (irq = 17) is a 16550A
0000:01:09.0: ttyS2 at I/O 0xbc08 (irq = 17) is a 16550A
kgdb: Registered I/O driver kgdboc.
kgdb: Waiting for connection from remote gdb...

Entering kdb (current=0xf6498000, pid 1) due to Keyboard Entry
kdb> 

- On the host computer, start a Gdb session using vmlinux :

$ gdb ./vmlinux
GNU gdb (GDB) 7.1-3mdv2011.0 (Mandriva Linux release 2010.1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mandriva-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/src/RPM.2/BUILD/kernel-
i386/linux-3.1/vmlinux...done.
(gdb) set remotebaud 19200
(gdb) target remote /dev/ttyS1
Remote debugging using /dev/ttyS1
arch_kgdb_breakpoint () at /usr/src/RPM.2/BUILD/kernel-
i386/linux-3.1/arch/x86/include/asm/kgdb.h:77
77      }
(gdb) 

This shows that Gdb connection to the target machine is OK.

- Stop the Minicom session using "Ctl A + Q" This also is OK

- Then back to the Gdb session. Using the "monitor" Gdb command. I am able to 
talk to the target kernel :

(gdb) monitor summary
sysname    Linux
release    3.1.5-desktop586-1kdb
version    #18 Sun Feb 19 11:22:13 UTC 2012
machine    i686
nodename   (none)
domainname (none)
ccversion  CCVERSION
date       2012-02-22 08:19:13 tz_minuteswest 0
uptime     00:00
load avg   0.00 0.00 0.00

MemTotal:         255133 kB
MemFree:          249496 kB
Buffers:               0 kB

(gdb) monitor cpu
Currently on cpu 0
Available cpus: 0

- Up to now, everything seems to be as expected. But if I try to continue 
target boot process using "monitor go", here is what I got ( and here is the 
problem ) :

(gdb) monitor go  
go must execute on the entry cpu, please use "cpu -1" and then execute go
(gdb) 

>From that point, I cannot do anything else but manually reset the target and 
kill the Gdb session because of what seems to be an error message.
So : is this a real bug or is there something wrong in the procedure I use ?

Many thanks in advance for any help / information.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to