[LLVMdev] custom landingpad data, not dwarf encoded clauses?

Duncan Sands baldrick at free.fr
Wed Apr 3 08:01:03 PDT 2013


Hi edA-qa mort-ora-y,

On 31/03/13 19:47, edA-qa mort-ora-y wrote:
> On 31/03/13 19:28, Duncan Sands wrote:
>>> How would I go about getting a custom data format stored at the
>>> exception landing pads (the location _Unwind_GetLanguageSpecificData
>>> returns)? The Dwarf encoded format is not well suited for the type of
>>> exception handling I wish to do in my language.
>> I didn't understand the question, can you please be more explicit about
>> what
>> you want to do exactly.
>
> I want to write custom data at the landingpads. That is, when I call
> _Unwind_GetLanguageSpecificData I would like that to point to a
> structure that I have created. Currently it points to a Dwarf encoded
> table, action records, etc.  A lot of my exception handling code is thus
> just there to decode the Dwarf information -- which seems optimized for
> C++ style type-based exceptions.
>
> My exceptions don't need all that information. Given simply the
> exception object (which is available in the personality) and a single
> integer at the landingpad I can know whether I have a catch or clean. I
> don't need C++ like RTTI for this to work.

you could do this by modifying the code generators to output your own table
format (you would need to modify DwarfException.cpp) but I doubt that it is
worth it.

Ciao, Duncan.



More information about the llvm-dev mailing list