[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: gdb for kernel debugging
Hi,
I am still not able to use gdb.
# gdb vmlinux /proc/kcore
/proc/kcore: Operation not permitted.
(gdb)
I have read in some other forum that access to /proc/kcore is disabled
in redhat distributions. Is it true?
I am on 2.6.5 kernel.
Thanks,
Vasu.
On 5/6/05, Sandeep <sandeep@xxxxxxxxxxxxxxx> wrote:
>
> Hi
>
>
>
>
> hello there,
> i was also trying to run gdb but when i tried the command that you told it
> gives the following error:
>
> gdb /linux-*/vmlinux /proc/kcore
>
> Hey don't use the exact comman... linux-*, use the actual kernel version for
> it... as linux-2.6.10.. or something similar according to ur kernel version.
> Try with this...
>
>
>
>
>
> sandeep
>
>
>
> GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as
> "i386-redhat-linux-gnu".../linux-*/vmlinux: No such file or
> directory.
>
> Core was generated by `ro root=LABEL=/'.
> #0 <function called from gdb>
> (gdb) q
>
> what could be the possible problem?
> thanks in advance
>
> Regards
> vaishali
>
> On Thu, 05 May 2005 lk wrote :
> >the image vmlinuz is in compressed form ..
> >it can't be directly used for debugging with gdb...
> >instead go for vmlinux ..
> >it'll be in ur usr/src/linux-*/
> >as we have enabled debugging in the config...
> >we'll get a huge vmlinux...
> >
> >start gdb as >>
> >gdb /linux-*/vmlinux /proc/kcore
> >
> >regards
> >lk
> >
> >----- Original Message -----
> > From: "Vasu S" <vasu.ss@xxxxxxxxx>
> >To: <kernelnewbies@xxxxxxxxxxxx>
> >Sent: Thursday, May 05, 2005 7:23 AM
> >Subject: gdb for kernel debugging
> >
> >
> > > Hi all,
> > >
> > > I am trying to use gdb for debugging kernel. My intention is just to
> > > go thru different kernel data structures.
> > > I am getting the following error.
> > >
> > > #gdb /boot/vmlinuz-2.6.5-1-debug.358 /proc/kcore
> > > GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
> > > Copyright 2004 Free Software Foundation, Inc.
> > > GDB is free software, covered by the GNU General Public License, and you
> >are
> > > welcome to change it and/or distribute copies of it under certain
> >conditions.
> > > Type "show copying" to see the conditions.
> > > There is absolutely no warranty for GDB. Type "show warranty" for
> >details.
> > > This GDB was configured as
> > >
> "i386-redhat-linux-gnu"..."/boot/vmlinuz-2.6.5-1-debug.358":
> not in
> > > executable format: File format not recognized
> > > /proc/kcore: Operation not permitted.
> > > (gdb) q
> > >
> > > ----------
> > > I have compiled the kernel with CONFIG_DEBUG_INFO set to y. Even
> > > googling the error didnt help.
> > > Please tell me what could be the problem. Am I missing something?
> > >
> > > Thanks for paying attention.
> > > Vasu
> > >
> > > --
> > > Kernelnewbies: Help each other learn about the Linux kernel.
> > > Archive: http://mail.nl.linux.org/kernelnewbies/
> > > FAQ: http://kernelnewbies.org/faq/
> > >
> > >
> >
> >
> >
> >--
> >Kernelnewbies: Help each other learn about the Linux kernel.
> >Archive: http://mail.nl.linux.org/kernelnewbies/
> >FAQ: http://kernelnewbies.org/faq/
> >
>
>
>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/