* kernel debugging with gdb
@ 2005-05-27 8:33 Vasu S
2005-05-27 8:40 ` Tigran Aivazian
0 siblings, 1 reply; 2+ messages in thread
From: Vasu S @ 2005-05-27 8:33 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel debugging with gdb
2005-05-27 8:33 kernel debugging with gdb Vasu S
@ 2005-05-27 8:40 ` Tigran Aivazian
0 siblings, 0 replies; 2+ messages in thread
From: Tigran Aivazian @ 2005-05-27 8:40 UTC (permalink / raw)
To: Vasu S; +Cc: gdb
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-27 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-27 8:33 kernel debugging with gdb Vasu S
2005-05-27 8:40 ` Tigran Aivazian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox