Hi Mark,

On Wed, Oct 03, 2007 at 05:10:00PM +0200, Mark Wielaard wrote:
> a) .debug_frame section. We already have some support for feeding some
> more information from a remote process to libunwind (I am currently
> flushing out our patches to the list so they can hopefully be merged,
> since the frysk libunwind diverged a bit over the last year). But we
> don't yet have the .debug_frame loading, feeding and parsing support
> itself.

Interesting.  If I do go forward with this plan I'll be sure to take a
look at Frysk's copy.

> > The things that would have to be implemented:
> > 
> >   - Finding and opening files to map .debug_frame.
> 
> So in frysk we do this ourselves (using libdwfl from elfutils) and we
> would need to feed that to libunwind.

I could easily do this - the immediate user I'm looking at is mpatrol,
which already has libelf and/or libbfd available.  But it seemed like
a useful thing to add to libunwind for general use.  If I'm going to
generalize, I'd rather generalize to something easy to use :-)

> >   - Handling the differences between .debug_frame and .eh_frame.
> >   They're important but small.
> 
> I was looking for a description of the differences. But it seems people
> either just know and if you don't then you have to go through the DWARF
> standard and the LSB core specification Exception Frames [1] and
> carefully compare them side-by-side. Is there a better description of
> the differences?

I vaguely remember seeing one, but I can't think where.  I was going
to work it out with the code base I'm most familiar with - there's a
very small handful of conditionals in GDB's DWARF reader, which
supports both formats.  They are:

  - Register numbering.
  - The use of 0 in .eh_frame vs ~0 in .debug_frame to mark CIEs.
  - PC-relative offsets from FDEs to CIEs in .eh_frame, instead of
    section-relative.

To the best of my knowledge, that's it.

-- 
Daniel Jacobowitz
CodeSourcery


_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to