From: gprabhunath@gmail.com (Prabhu nath)
To: kernelnewbies@lists.kernelnewbies.org
Subject: KGDB Setup problem
Date: Thu, 12 May 2011 06:16:12 +0530 [thread overview]
Message-ID: <BANLkTimGC7efed=kZZWH6vYHZBY8moMphA@mail.gmail.com> (raw)
Dear All / Spiro,
I tried setting up KGDB on my machine but somehow I am not finding
my luck for past few months.
Sprio. in his earlier mail had said about his success of setting up
KGDB, Can you please share your notes of how to set up KGDB. If possibe
please share the screen shots. Let me feel happy about the gdb prompt.
Following is my set up.
I have two x86 single core machines. C1 and C2.
C1 = target
C2 = Host
On Target I have built a custom kernel 2.6.34 with KGDB enabled. Here is the
snapshot of my .config
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_INFO=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
My vmlinux is around 65MB.
*Scenario 1:*
I connected a null modem cable from C1 to C2. Tested the cable by
redirecting the kernel boot logs from C1 to C2 thru the cable and cable is
fine.
I connected C1 to a LCD monitor (console=tty0) through a VGA cable so that I
used tty0 to view normal kernel booting logs and null modem cable to work
with debugger
My grub.conf is
title Fedora (2.6.34)
root (hd0,1)
kernel /vmlinuz-2.6.34 ro root=UUID=4a51e22e-ec12-469f-80ff-17afe3e6f15f
rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16 KEYTABLE=us
console=tty0 kgdbwait
kgdb8250=ttyS0,115200
initrd /initramfs-2.6.34.img
*The result was, on booting up the kernel kgdb was not waiting. *
*Scenario 2.
*I connected a null modem cable from C1 to C2. Tested the cable by
redirecting the kernel boot logs from C1 to C2 thru the cable and cable is
fine.
I connected C1 to a LCD monitor (console=tty0) through a VGA cable so that I
tty0 to view normal kernel booting logs and null modem cable to work with
debugger
My grub.conf is
title Fedora (2.6.34)
root (hd0,1)
kernel /vmlinuz-2.6.34 ro root=UUID=4a51e22e-ec12-469f-80ff-17afe3e6f15f
rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16 KEYTABLE=us
console=tty0 kgdbwait
kgdboc=ttyS0,115200
initrd /initramfs-2.6.34.img
*The result is, on booting up the kernel kgdb is waiting for the input (
This log was seen on my LCD monitor) but Alt-SysRq-g did not work here to
switch to the debugger
*
*Scenario 3:*
I connected a null modem cable from C1 to C2. Tested the cable by
redirecting the kernel boot logs from C1 to C2 thru the cable and cable is
fine.
My grub.conf is
title Fedora (2.6.34)
root (hd0,1)
kernel /vmlinuz-2.6.34 ro root=UUID=4a51e22e-ec12-469f-80ff-17afe3e6f15f
rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16 KEYTABLE=us
console=ttyS0,115200n8
kgdbwait kgdboc=ttyS0,115200 kgdbcon
initrd /initramfs-2.6.34.img
* The result is, on booting up the kernel kgdb is waiting for the input (
This log was seen on my minicom console) but Alt-SysRq-g did not work and it
threw some garbage. *
On the host side I executed the following commands.
# gdb ./vmlinux
(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyS0
Some of the documents say that after executing the last command I
should see the gdb prompt from where I can set breakpoints, single
stepping, but didn't show up for me :(
*Note:* If it really matters. I was working on my host machine through
a putty session.
Request you or anyone to bail me out from the clutches of this
precarious problem.
Thanks,
Prabhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110512/746dca4b/attachment.html
next reply other threads:[~2011-05-12 0:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 0:46 Prabhu nath [this message]
2011-05-12 11:54 ` KGDB Setup problem 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='BANLkTimGC7efed=kZZWH6vYHZBY8moMphA@mail.gmail.com' \
--to=gprabhunath@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).