All of lore.kernel.org
 help / color / mirror / Atom feed
From: nuno.m.g.martins@gmail.com (Nuno Martins)
To: kernelnewbies@lists.kernelnewbies.org
Subject: KGDB problem at first breakpoint
Date: Wed, 18 May 2011 15:45:31 +0100	[thread overview]
Message-ID: <BANLkTi=cq+1GHgFD83Qd+QsvcuWO4rbQ0w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik6XN3Sru3r4svtXKFVDbmtxCa0Rg@mail.gmail.com>

On Wed, May 18, 2011 at 12:23 PM, Prabhu nath <gprabhunath@gmail.com> wrote:
> Dear All,
> ? ? ? ?There is a problem with the KGDB at the very first break point after
> executing the gdb command "target remote /dev/ttyS0" from the host.
> ? ? ? ?I have?verbatim,?followed the KGDB
> document?http://kernel.org/pub/linux/kernel/people/jwessel/kdb/
> Problem Logs:
> ---------------------
> Details ?of my hardware and system software:
> -------------------------------------------------------------------
> Host (Development machine):
> ? ? ? ? ? ? ? ? ? ? ? Intel Pentium IV Machine with Fedora Core 12
> ? ? ? ? ? ? ? ? ? ? ? Linux Version :?2.6.31.5-127.fc12.i686.PAE
> ? ? ? ? ? ? ? ? ? ? ? gdb version :?GNU gdb (GDB) Fedora (7.0-3.fc12)
> Target:
> ? ? ? ? ? ? ? ? ?Intel Pentium IV Machine with Fedora Core 12
> ? ? ? ? ? ? ? ? ?Customized Linux Version : ?2.6.38
> Host is connected to Target via a null modem cable
> Snapshot of .config of linux version 2.6.38 on the target
> # CONFIG_DEBUG_RODATA is not set
> CONFIG_HAVE_ARCH_KGDB=y
> CONFIG_FRAME_POINTER=y
> CONFIG_DEBUG_INFO=y
> CONFIG_KGDB=y
> CONFIG_KGDB_SERIAL_CONSOLE=y
> CONFIG_KGDB_LOW_LEVEL_TRAP=y
> Grub config on the target machine
> title Fedora (2.6.38)
> ? ? ? ? root (hd0,0)
> ? ? ? ? kernel /boot/vmlinuz-2.6.38 ro
> root=UUID=fb7800fb-cfe7-438d-bc7f-c153ba4353d1 ?LANG=en_US.UTF-8
> SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=usconsole=ttyS0,115200n8
> kgdboc=ttyS0 kgdbwait
> ? ? ? ? initrd /boot/initrd-2.6.38.img
Do you have other serial line that you can connect to ? If you have
you could try to connect the console or the kgdboc to other serial
line.
This way you can have each on it's private serial line. I don't know
if it can multiplex the signal.

>
> On power on of the target, linux kernel boots and the logs are seen on the
> minicom console of the host and it will wait for the gdb on the host to
> connect. Here is the last 4 lines of the logs seen on the minicom
> Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> kgdb: Registered I/O driver kgdboc.
> kgdb: Waiting for connection from remote gdb..
> --- Now I close the minicom console (Ctrl-A X) and start the gdb on the
> host. Here is the steps I follow.
> On the host machine:
>
> [root at localhost kgdb]# gdb vmlinux
> GNU gdb (GDB) Fedora (7.0-3.fc12)
> Copyright (C) 2009 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 "i686-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /root/kgdb/vmlinux...done.
> (gdb) set remotebaud 115200
> (gdb) set debug remote 1
> (gdb) target remote /dev/ttyS0
> Remote debugging using /dev/ttyS0
> Sending packet: $qSupported#37...Ack
> Packet received:
> Packet qSupported (supported-packets) is NOT supported
> Sending packet: $Hg0#df...Ack
> Packet received: OK
> Sending packet: $?#3f...Ack
> Packet received: S05
> Sending packet: $Hc-1#09...Ack
> Packet received: OK
> Sending packet: $qC#b4...Ack
> Packet received: QC01
> Sending packet: $qAttached#8f...Ack
> Packet received:
> Packet qAttached (query-attached) is NOT supported
> Sending packet: $qOffsets#4b...Ack
> Packet received:
> Sending packet: $g#67...Ack
> Packet received:
> 36000000ffffffff0abaffff20d98bc06c3f86de783f86de803ac8dd803f86de885747c00202000060000000680000007b00c8dd7b0086deffff0000ffff0000
> Sending packet: $mc0475788,1#a4...Ack
> Packet received: 0f
> Sending packet: $mc0475788,8#ab...Ack
> Packet received: 0faef889f6ff0d08
> Sending packet: $mc0475788,7#aa...Ack
> Packet received: 0faef889f6ff0d
> 0xc0475788 in ?? ()
> Sending packet: $qSymbol::#5b...Ack
> Packet received:
> Packet qSymbol (symbol-lookup) is NOT supported
> (gdb) s
> Cannot find bounds of current function
> (gdb)
>
> Observation:
> ? ? ? ? ? ? ? ? ? ? ?1.?Ideally the kernel being debugged should break at
> legitimate address and the corresponding line number should
> ? ? ? ? ? ? ? ? ? ? ? ? ?be?displayed instead of "?0xc0475788 in ?? ()".
> ? ? ? ? ? ? ? ? ? ? ?2.?On inspecting section header in vmlinux executable,
> I found the .text section address range is from
> ? ? ? ? ? ? ? ? ? ? ? ? ?0xC1000000 to 0xC1326e58??and no section's contents
> associate with the address 0xC0475788.
> ? ? ? ? ? ? ? ? ? ? ?3.?Hence on single stepping, gdb logs the error
> as?"Cannot find bounds of current function"
> ?Humbly request you to help me in addressing this issue.
> Thanks and Regards,
> Prabhu
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>



-- 
Nuno Martins

  reply	other threads:[~2011-05-18 14:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 11:23 KGDB problem at first breakpoint Prabhu nath
2011-05-18 14:45 ` Nuno Martins [this message]
     [not found] ` <BANLkTi=Phgzd5vpOUttkDTzrTLWA1qMSMA@mail.gmail.com>
2011-05-20  4:23   ` [Kgdb-bugreport] " Prabhu nath
     [not found]     ` <BANLkTik0y7Tp=OcLd7O9fjpdDYCf1oOZtQ@mail.gmail.com>
2011-05-31  8:51       ` Prabhu nath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=cq+1GHgFD83Qd+QsvcuWO4rbQ0w@mail.gmail.com' \
    --to=nuno.m.g.martins@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.