[linux-yocto] gdb target kernel debug

Lai Eddy eddy.lai.tw at gmail.com
Wed Apr 3 00:55:33 PDT 2013


I want to debug the kernel module loaded in the x86_64 (jasperforest)
linux-yocto target,
so I load the 'vmlinux' with gdb on the host PC (CentOS 6.4_x64) ,
but looks like the gdb failed to connect the target,
should I add any 'kernel boot parameters' to enable the kgdb use ttyS0 ?

my target boot from a USB drive with SYSLINUX, the target's ttyS0 is used
as console output,
should I use ttyS1 on target as debug port instead of ttyS0? how can I set
that?

and , when I run "echo g > /proc/sysrq-trigger" on target console, the
target machine not freeze as expect.

----------------------------------------------------------------------------------------------------------------------
[root at localhost linux-jasperforest-standard-build]# x86_64-poky-linux-gdb
vmlinux
GNU gdb (GDB) 7.5
Copyright (C) 2012 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 "--host=x86_64-pokysdk-linux
--target=x86_64-poky-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols
fromtmp/work/jasperforest-poky-linux/linux-yocto/3.4.26+gitAUTOINC+4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993_840bb8c059418c4753415df56c9aff1c0d5354c8-r4.3/linux-jasperforest-standard-build/vmlinux...done.
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Ignoring packet error, continuing...
warning: unrecognized item "qRelocInsn+���b5" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, qOffsets���4bftiprocess
(gdb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/linux-yocto/attachments/20130403/24919be6/attachment.html>


More information about the linux-yocto mailing list