RE: what is minimally necessary to run "gdb vmlinux /proc/kcore"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 4 Jul 2007, Rajat Jain wrote:

>
> Hi,
>
> > so even eithout selecting DEBUG_INFO, you can still examine at
> > least *basic* data objects. ...
>
> I was wondering what does "basic object" set comprise of. Does that
> mean gdb will be able to calculate address of all global symbols
> (including global structure variables), but will cry when we ask it
> to fetch structure member variables (because it does not know the
> offset)?

something like that, but i can't be more specific.  as an example, you
can read a paper about kernel debugging with gdb here:

http://dslab.lzu.edu.cn/docs/publications/kernel_gdb.pdf

where the author shows how selecting DEBUG_INFO allows you to cast
addresses to struct types and so on.  without that, your ability to
dump by name is obviously going to be more limited, but it will still
give you *some* functionality.  if someone can be more precise about
what's going on here, that would be good.

> Also, did you verify (by objdump) whether or not the vmlinux
> contains symbol table?

i just ran "nm" on vmlinux, where you can see output like this:

...
c0566c00 D jiffies
c0566c00 D jiffies_64
...

  which allegedly means you can dump the contents of those variables
using gdb, even without DEBUG_INFO.  i'm still playing with this.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux