kgdb usage errors on strictly following kgdb authorss guide
Gilad Ben-Yossef
gilad at codefidence.com
Sun Feb 8 10:28:48 IST 2009
Lev Olshvang wrote:
>
> Hello all,
>
> I am looking for explanation of the kgdb errors and usage advice.
>
> I am running Linux 2.6.15.5 system with a kgdb patches from the
> kgfb.linsyssoft.com.
>
> I built a kernel with ethernet driver included (not module) and KGDB
> remote debug enable over Ethernet.
>
> I am trying to strictly follow the guide I had downloaded from
> linsyssoft.com
>
>
> First I tried to run debug other ethernet using kgdboe parameter on boot
>
> I built a kernel with ethernet driver included (not module) and KGDB
> remote debug enable over Ethernet.
>
> And the gdb session was stuck because the target system did not
> answered to ARP requsests
> for 10.0.0.3
> The corresponding section from gub.conf is
>
> title Linux-2.6.15.5-kgdb(eth)
> root (hd0,0)
> kernel /boot/vmlinuz-2.6.15.5-kgdb ro root=/dev/hda1
> kgdboe=@10.0.0.6/, at 10.0.0.3/
> console=ttyS0,115200
>
>
> So I suppose I should manually load network driver, but how can I do
> it from boot line and assign IP address to it ?
The answers, as very often with such simple questions, are in the kernel
documentation directory:
Add
"ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>"
to the kernel command line. See
http://lxr.linux.no/linux+v2.6.28.4/Documentation/filesystems/nfsroot.txt#L80
for the details
> -------------------------------------------------------------------------------------------------------------------
>
>
> The second attempt I took with a serial 8250 driver
> I had build new kernel with Serial driver configured for remote
> debugging and
>
> changed boot line to :
>
> kernel /boot/vmlinuz-2.6.13-kgdb ro root=/dev/hda1 kgdbwait
> kgdb8250=1,115200
>
> *Question1 : - docs says it must be kgdb8250=ttyS1,115200,
> *
> but when I tried this , the debug session even did not come to kgdb
> breakpoint.
I'm guessing it needs to be ttyS0 and not 1.
>
>
> gdbmod-2.4 ./vmlinux itle Linux-2.6.15.5-kgdb(eth)
>
>
> GNU gdb 6.4
> Copyright 2005 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and
> you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details.
> This GDB was configured as "i686-pc-linux-gnu"...Using host
> libthread_db library "/lib/libthread_db.so.1".
>
> (gdb) set remotebaud 115200
> (gdb) target remote /dev/ttyS0
> Remote debugging using /dev/ttyS0
> breakpoint () at kernel/kgdb.c:1888
> 1888 atomic_set(&kgdb_setting_breakpoint, 0);
> (gdb) cont
> Continuing.
> [17179569.184000] Waiting for connection from remote gdb...
> [*17179569.184000] Invalid syntax for option kgdb8250=*
>
> [New thread 1737]
> Error while mapping shared library sections:
> ide_disk.ko: Success.
> Error while reading shared library symbols:
> ide_disk.ko: No such file or directory.
> Error while reading shared library symbols:
> ide_disk.ko: No such file or directory.
> [New thread 1774]
> Error while reading shared library symbols:
> ide_disk.ko: No such file or directory.
> Error while reading shared library symbols:
> ide_disk.ko: No such file or directory.
> [New thread 1747]
> Error while mapping shared library sections:
> generic.ko: Success.
> Error while reading shared library symbols:
> ide_disk.ko: No such file or directory.
> Error while reading shared library symbols:
> generic.ko: No such file or directory.
> Error while reading shared library symbols:
> ide_disk.ko: No such file or directory.
> Error while reading shared library symbols:
> generic.ko: No such file or directory.
> [New thread 1757]
> Error while mapping shared library sections
>
> Question 3 : Are those Succeses and Errors normal
No. I think you are missing the path to where the target kernel modules
are. It should something like
set solib-absolute-prefix /dev/null
set solib-search-path /path/to/kernel/modules
> Question 4: How I can command to load my module from gdb line and set
> a breakpoint to the function I would like to debug ?
>
Just load your modules on the target and then break in gdb and plant the
break point. you can also plant a break point before loading the module
(a defered break point) if you want to break in the module init function.\
Gilad
>
>
> Regards to the kenel gurus.
>
> Lev
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
--
Gilad Ben-Yossef
Chief Coffee Drinker
Codefidence Ltd.
The code is free, your time isn't.(TM)
Web: http://codefidence.com
Email: gilad at codefidence.com
Office: +972-8-9316883 ext. 201
Fax: +972-8-9316885
Mobile: +972-52-8260388
The Doctor: Don't worry, Reinette, just a nightmare.
Everyone has nightmares. Even monsters from under the
bed have nightmares, don't you, monster?
Reinette: What do monsters have nightmares about?
The Doctor: Me!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090208/b4393f20/attachment.html>
More information about the Linux-il
mailing list