public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: UmaMaheswari Devi <uma@cs.unc.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel debugging
Date: Sun, 24 Jul 2005 16:02:12 +0200	[thread overview]
Message-ID: <9a8748490507240702593372d4@mail.gmail.com> (raw)
In-Reply-To: <42E3946E.4010009@cs.unc.edu>

On 7/24/05, UmaMaheswari Devi <uma@cs.unc.edu> wrote:
> I am new to kernel hacking and am facing problems in trying to peek at the
> runtime values of some kernel variables using gdb.
> 
> I am issuing the gdb command as follows:
>      gdb vmlinux /proc/kcore
> This displays the message
>     /proc/kcore: Operation not permitted
> before the (gdb) prompt is displayed.
> gdb then prints a value of 0 for any valid variable that is requested.
> 
> vmlinux appears to be OK, as gdb correctly identifies undefined variables.
> The problem seems to be with /proc/kcore. This file has a permission of 400. I
> am using the Red Hat distribution.
> 
> Any help is appreciated.
> 
If you want to use gdb to debug the kernel you should probably
investigate UML (User Mode Linux). Take a look at this link :
http://user-mode-linux.sourceforge.net/debugging.html

Alternatives include kgdb - http://kgdb.sourceforge.net/ 
and kdb - http://oss.sgi.com/projects/kdb/

You can also find many documents on Linux Kernel debugging aids and
techniques via google.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2005-07-24 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-24 13:15 kernel debugging UmaMaheswari Devi
2005-07-24 14:02 ` Jesper Juhl [this message]
2005-07-24 14:03   ` Jesper Juhl
2005-07-25 19:23 ` uma
2005-07-25 20:02   ` Lee Revell

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=9a8748490507240702593372d4@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uma@cs.unc.edu \
    /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