Michael Matz wrote:
Hi,

On Fri, 15 May 2009, Michael Eager wrote:

Is there any documentation on the contents of .eh_frame
and the augmentations used?

.eh_frame simply contains normal unwinding information, in DWARF2(34) format, you're familiar with that :)

And nothing more, specifically it does _not_ contain information about try/catch blocks inside functions. This is language specific data (which the Language Specific Data Area (LSDA) pointer in .eh_frame points to). The Augmentations were already explained, and in the x86-64 ABI (http://www.x86-64.org/documentation/abi.pdf, section 3.6 "Dwarf Definition", 4.2.4 "EH_FRAME sections" and 6.2.1 "Exception Handler Framework") we have some more info, but it's not _much_ more and also deals only with the augmentations.

Thanks.  I remembered seeing the try/catch data, but mis-remembered that
it was in the .eh_frame, not LDSA.

As the description of try/catch (and finally in some languages) is language specific it's not standardized. It is only understood by the personality routine (a pointer to it is encoded in .eh_frame too, when necessary). The whole exception throwing related unwinding explained somewhat okay in the above document, sections 6.2.1.

But the _format_ of the LSDA is not specified. It's really an implementation detail of the compiler/language and doesn't have to be agreed upon for mixing .o files from different compilers, as every compilation unit can have it's own personality routine.

This is what needs to be documented and specified for the PPC ABI.

Having said that, the LSDA format that gcc uses didn't change that much over time (for C++ at least), so describing it would be nice. http://www.codesourcery.com/public/cxx-abi/exceptions.pdf seems to describe something of it, I haven't verified how current it is, though.

Great.  This looks like exactly what I was looking for.

Do you happen to know the copyright status on the HP document?


--
Michael Eager    ea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Reply via email to