From: Tigran Aivazian <tigran@veritas.com>
To: Vasu S <vasu.ss@gmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: kernel debugging with gdb
Date: Fri, 27 May 2005 08:40:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.61.0505270937590.3010@ezer.homenet> (raw)
In-Reply-To: <2acab652050527013212d1ecfe@mail.gmail.com>
Hello Vasu,
First of all, access to /proc/kcore (and /dev/kmem) is explicitly disabled
on some distributions (e.g. Red Hat) as they consider it a security issue.
Second, what you were trying to do wouldn't allow to debug the kernel
anyway. At best (if the kernel was compiled with -g) you would get access
to dump data variables like jiffies.
Third, to actually debug the kernel using gdb you need to go to kgdb
homepage:
http://kgdb.linsyssoft.com/
and download the bits and pieces you need. If you are running on x86_64
architecture and wish to debug modules (as opposed to just statically
linked kernel bits) then you will also need my fixes to the gdb patch
which I can email you.
Kind regards
Tigran
On Fri, 27 May 2005, Vasu S wrote:
> Hello all,
>
> I am trying to use gdb for kernel debugging. I am getting the following error
>
> # gdb vmlinux /proc/kcore
>
> /proc/kcore: Operation not permitted.
> (gdb)
>
> I have compiled the kernel with debug options enabled. I am on 2.6.5 kernel.
> Can someone tell me what could be the problem here? Any help is appreciated.
>
> Thanks,
> Vasu
>
prev parent reply other threads:[~2005-05-27 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-27 8:33 Vasu S
2005-05-27 8:40 ` Tigran Aivazian [this message]
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=Pine.LNX.4.61.0505270937590.3010@ezer.homenet \
--to=tigran@veritas.com \
--cc=gdb@sources.redhat.com \
--cc=vasu.ss@gmail.com \
/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