Enabling CONFIG_DEBUG_RODATA also didn't work. <br><br>-Prabhu<br><br><br><div class="gmail_quote">On Thu, May 19, 2011 at 6:45 AM, Dongdong Deng <span dir="ltr"><<a href="mailto:libfetion@gmail.com">libfetion@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, May 18, 2011 at 7:23 PM, Prabhu nath <<a href="mailto:gprabhunath@gmail.com">gprabhunath@gmail.com</a>> wrote:<br>
> Dear All,<br>
><br>
> There is a problem with the KGDB at the very first break point after<br>
> executing the gdb command "target remote /dev/ttyS0" from the host.<br>
> I have verbatim, followed the KGDB document<br>
> <a href="http://kernel.org/pub/linux/kernel/people/jwessel/kdb/" target="_blank">http://kernel.org/pub/linux/kernel/people/jwessel/kdb/</a><br>
><br>
> Problem Logs:<br>
> ---------------------<br>
><br>
> Details of my hardware and system software:<br>
> -------------------------------------------------------------------<br>
><br>
> *Host (Development machine): *<br>
> Intel Pentium IV Machine with Fedora Core 12<br>
> Linux Version : 2.6.31.5-127.fc12.i686.PAE<br>
> gdb version : GNU gdb (GDB) Fedora (7.0-3.fc12)<br>
><br>
> *Target:*<br>
> Intel Pentium IV Machine with Fedora Core 12<br>
> Customized Linux Version : 2.6.38<br>
><br>
> Host is connected to Target via a null modem cable<br>
><br>
> *Snapshot of .config of linux version 2.6.38 on the target *<br>
> *<br>
> *<br>
> # CONFIG_DEBUG_RODATA is not set<br>
<br>
<br>
</div>Hi Prabhu,<br>
<br>
The CONFIG_DEBUG_RODATA was suggested to set at KGDB,<br>
Could you enable it?<br>
<br>
CONFIG_DEBUG_RODATA = y<br>
<br>
Dongdong<br>
<div class="im"><br></div></blockquote><div> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
<br>
><br>
> CONFIG_HAVE_ARCH_KGDB=y<br>
> CONFIG_FRAME_POINTER=y<br>
> CONFIG_DEBUG_INFO=y<br>
> CONFIG_KGDB=y<br>
> CONFIG_KGDB_SERIAL_CONSOLE=y<br>
> CONFIG_KGDB_LOW_LEVEL_TRAP=y<br>
><br>
> *Grub config on the target machine*<br>
> *<br>
> *<br>
> title Fedora (2.6.38)<br>
> root (hd0,0)<br>
> kernel /boot/vmlinuz-2.6.38 ro<br>
> root=UUID=fb7800fb-cfe7-438d-bc7f-c153ba4353d1 LANG=en_US.UTF-8<br>
</div><div class="im">> SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us*console=ttyS0,115200n8<br>
</div>> kgdboc=ttyS0 kgdbwai*t<br>
<div><div></div><div class="h5">> initrd /boot/initrd-2.6.38.img<br>
><br>
><br>
> On power on of the target, linux kernel boots and the logs are seen on the<br>
> minicom console of the host and it will wait for the gdb on the host to<br>
> connect. Here is the last 4 lines of the logs seen on the minicom<br>
><br>
> Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled<br>
> serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A<br>
> 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A<br>
> kgdb: Registered I/O driver kgdboc.<br>
> kgdb: Waiting for connection from remote gdb..<br>
><br>
> *--- Now I close the minicom console (Ctrl-A X) and start the gdb on the<br>
> host. Here is the steps I follow. *<br>
> *<br>
> *<br>
> *On the host machine:*<br>
> *<br>
> *<br>
><br>
> [root@localhost kgdb]# gdb vmlinux<br>
><br>
> GNU gdb (GDB) Fedora (7.0-3.fc12)<br>
> Copyright (C) 2009 Free Software Foundation, Inc.<br>
> License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.html</a><br>
>><br>
> This is free software: you are free to change and redistribute it.<br>
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
> and "show warranty" for details.<br>
> This GDB was configured as "i686-redhat-linux-gnu".<br>
> For bug reporting instructions, please see:<br>
> <<a href="http://www.gnu.org/software/gdb/bugs/" target="_blank">http://www.gnu.org/software/gdb/bugs/</a>>...<br>
> Reading symbols from /root/kgdb/vmlinux...done.<br>
><br>
> (gdb) set remotebaud 115200<br>
> (gdb) set debug remote 1<br>
> (gdb) target remote /dev/ttyS0<br>
> Remote debugging using /dev/ttyS0<br>
> Sending packet: $qSupported#37...Ack<br>
> Packet received:<br>
> Packet qSupported (supported-packets) is NOT supported<br>
> Sending packet: $Hg0#df...Ack<br>
> Packet received: OK<br>
> Sending packet: $?#3f...Ack<br>
> Packet received: S05<br>
> Sending packet: $Hc-1#09...Ack<br>
> Packet received: OK<br>
> Sending packet: $qC#b4...Ack<br>
> Packet received: QC01<br>
> Sending packet: $qAttached#8f...Ack<br>
> Packet received:<br>
> Packet qAttached (query-attached) is NOT supported<br>
> Sending packet: $qOffsets#4b...Ack<br>
> Packet received:<br>
> Sending packet: $g#67...Ack<br>
> Packet received:<br>
> 36000000ffffffff0abaffff20d98bc06c3f86de783f86de803ac8dd803f86de885747c00202000060000000680000007b00c8dd7b0086deffff0000ffff0000<br>
> Sending packet: $mc0475788,1#a4...Ack<br>
> Packet received: 0f<br>
> Sending packet: $mc0475788,8#ab...Ack<br>
> Packet received: 0faef889f6ff0d08<br>
> Sending packet: $mc0475788,7#aa...Ack<br>
> Packet received: 0faef889f6ff0d<br>
> 0xc0475788 in ?? ()<br>
> Sending packet: $qSymbol::#5b...Ack<br>
> Packet received:<br>
> Packet qSymbol (symbol-lookup) is NOT supported<br>
> (gdb) s<br>
> Cannot find bounds of current function<br>
> (gdb)<br>
><br>
><br>
> *Observation:*<br>
> *1.* Ideally the kernel being debugged should break at<br>
> legitimate address and the corresponding line number should<br>
> be displayed instead of " 0xc0475788 in ?? ()".<br>
><br>
> 2. On inspecting section header in vmlinux executable,<br>
> I found the .text section address range is from<br>
> 0xC1000000 to 0xC1326e58 and no section's contents<br>
> associate with the address 0xC0475788.<br>
><br>
> *3.* Hence on single stepping, gdb logs the error<br>
> as* "Cannot<br>
> find bounds of current function"*<br>
> *<br>
> *<br>
> Humbly request you to help me in addressing this issue.<br>
><br>
> Thanks and Regards,<br>
> Prabhu<br>
</div></div>> ------------------------------------------------------------------------------<br>
> What Every C/C++ and Fortran developer Should Know!<br>
> Read this article and learn how Intel has extended the reach of its<br>
> next-generation tools to help Windows* and Linux* C/C++ and Fortran<br>
> developers boost performance applications - including clusters.<br>
> <a href="http://p.sf.net/sfu/intel-dev2devmay" target="_blank">http://p.sf.net/sfu/intel-dev2devmay</a><br>
> _______________________________________________<br>
> Kgdb-bugreport mailing list<br>
> <a href="mailto:Kgdb-bugreport@lists.sourceforge.net">Kgdb-bugreport@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport" target="_blank">https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport</a><br>
><br>
</blockquote></div><br>