This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: kernel debugging with 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]