kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: ml-kernelnewbies@spiro.trikaliotis.net (Spiro Trikaliotis)
To: kernelnewbies@lists.kernelnewbies.org
Subject: KGDB set up problem
Date: Wed, 11 May 2011 21:36:52 +0200	[thread overview]
Message-ID: <20110511193652.GN5513@trikaliotis.net> (raw)
In-Reply-To: <BANLkTim0GgCUJWzJAbBagHLgSjrJ27DUzQ@mail.gmail.com>

Hello Prabhu,

your mail formatting is somehow distorted. However, I will try to answer
anyway:

* On Wed, May 11, 2011 at 11:03:29PM +0530 Prabhu nath wrote:

>    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
[...]
>    The result was, on booting up the kernel kgdb was not waiting.

Here, the command line parameter are wrong.

First: kgdb8250 is called kgdboc now.
Second: Order matters. You must specify kgdbwait AFTER kgdboc in order
for it to take effect.

>    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

Is it really waiting? I could not get it to work unless I switched the
order of kgdbwait and kgdboc. I think I also found it written somewhere
on the net that order matters here.

Now, regarding sysrq:
- What is the output of:
  # cat /proc/sys/kernel/sysrq

  Either specify a 1, or a bit mask which selectively switches
  everything on.

  -OR-

  add "kernel.sysrq = 1" to  /etc/sysctl.conf.

Having said this, Alt-Sysrq-g does not work for me, either!
But:

  # echo g > /proc/sysrq-trigger

Works for me.

I have not yet figured out why this is.



Having said all this: Do you want to use the magic sysrq to initially
break into the debugger? This does not work, and it is not necessary (if
you switch the order of kgdboc and kgdbwait).

>    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

I never tried to have the console and kgdboc on the same serial port. Is
this even supposed to work?


BTW, your idea about writing an article on how I set it up is a good
idea. I will try to find the time to do so.

HTH
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/

           reply	other threads:[~2011-05-11 19:36 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <BANLkTim0GgCUJWzJAbBagHLgSjrJ27DUzQ@mail.gmail.com>]

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=20110511193652.GN5513@trikaliotis.net \
    --to=ml-kernelnewbies@spiro.trikaliotis.net \
    --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).