public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* extract debuginfo for Xorg backtraces
@ 2011-02-17 11:46 Elmar Stellnberger
  2011-02-22 15:36 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Elmar Stellnberger @ 2011-02-17 11:46 UTC (permalink / raw)
  To: binutils

  I have written a small program using libbfd which should extract
symbolic information out of an Xorg backtrace as dumped in Xorg.log.
It works well for everything in /usr/bin/Xorg. However as the
backtrace meets a shared library (libc.so, radeon_drv.so,
evdev_drv.so) the symtab does not contain any section that would
include the given addresses/+offsets.
  Is there any relocation offset or anything else which I will have to
subtract from the memory addresses given in the backtrace? The symbols
from the .so-s seem to be loaded correctly so far (If I skip the check
for the end of a section it will always find a (random) symbol so that
the actual symbolic information is located before to where the dumped
addresses point to.).

Many Thanks for Your Reply,
Elmar Stellnberger

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: extract debuginfo for Xorg backtraces
  2011-02-17 11:46 extract debuginfo for Xorg backtraces Elmar Stellnberger
@ 2011-02-22 15:36 ` Nick Clifton
  2011-02-22 16:46   ` Elmar Stellnberger
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2011-02-22 15:36 UTC (permalink / raw)
  To: Elmar Stellnberger; +Cc: binutils

Hi Elmar,

> It works well for everything in /usr/bin/Xorg. However as the
> backtrace meets a shared library (libc.so, radeon_drv.so,
> evdev_drv.so) the symtab does not contain any section that would
> include the given addresses/+offsets.

How about the dynamic symbol table ?

I suggest that you have a look at the GDB code base to see how symbols 
in shared libraries are handled there.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: extract debuginfo for Xorg backtraces
  2011-02-22 15:36 ` Nick Clifton
@ 2011-02-22 16:46   ` Elmar Stellnberger
  0 siblings, 0 replies; 3+ messages in thread
From: Elmar Stellnberger @ 2011-02-22 16:46 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

 Well, I have already resolved the problem by either just taking the
offsets for the so-s or if available by using /proc/pid/maps to
calculate them (works better).
 Now the next riddle is on how to obtain the load base for a kernel
module in order to decode crashes related to kernel modules (lsmod
does not seem to be useful since it only shows the size but not the
load base).

  Why is it no more possible to save the kernel`s call interface per
dd from /proc/self/mem into a file? - dd if=/proc/self/mem
of=/dld/linux-gate.so.1 skip=$((0xffffe000)) count=1 bs=4096
How does ldd obtain the kernel address 0xffffe000 of the call gate
window - it apparently does not appear in /proc/self/maps (just the
window where it shows up.). Can I open this with libbfd?

2011/2/22, Nick Clifton <nickc@redhat.com>:
> Hi Elmar,
>
>> It works well for everything in /usr/bin/Xorg. However as the
>> backtrace meets a shared library (libc.so, radeon_drv.so,
>> evdev_drv.so) the symtab does not contain any section that would
>> include the given addresses/+offsets.
>
> How about the dynamic symbol table ?
>
> I suggest that you have a look at the GDB code base to see how symbols
> in shared libraries are handled there.
>
> Cheers
>    Nick
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-22 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 11:46 extract debuginfo for Xorg backtraces Elmar Stellnberger
2011-02-22 15:36 ` Nick Clifton
2011-02-22 16:46   ` Elmar Stellnberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).