I just added an exception example to the wiki intended to be run in a JIT environment. Although this information is heavily date dependent,
as the LLVM exception subsystem will be modified as time goes on, I could have used such an example when I was looking into this; hence the submission.
Having said this, I'm not an LLVM expert, and even though the code works, I'm sure there are omissions and inaccuracies, so if the experts have
the time ...
Hopefully some members of the community will find this beneficial
PS: Is there a better to upload source to the wiki than merely pasting it in? Only image file types seemed to be allowed for upload.
Oh I could definitely use an example like that, would be very nice if
there was such an example as an included project in LLVM itself like
the other examples and tutorials, would force it to stay updated too.
EDIT: Er, helps if I send to the LLVM list...
If the powers at be want this, I could easily transform the source to the LLVM coding standards, and add
the necessary portable UNIX support--someone else would have to add non-UNIX support although the
System library probably helps with this. However I'm guessing the LLVM release flux of the exception system,
along with a lack of universal platform, dwarf JIT support might be a hinderance in such an endeavor. I don't
know what the current platform boundaries are for either JIT or JIT with dwarf emission, but I do know that
the LLVM exception design is being reconsidered for future releases (possibly 2.7?).
Also, as noted in the wiki, please see:
for real world implementations. There are many others, as can be seen in the LLVM project page.
I am one such non-unix platform, so if the example does not work for
me, it is still as worthless as bad documentation for note...
Understood. Sorry for my lack of background on these platforms. Do you know if llvm.eh.selector and dwarf emission
for a JIT execution environment works on your platform of choice? If so, and if the unwind system conforms to
http://refspecs.freestandards.org/abi-eh-1.21.html, the port will not be too bad. Beyond use of fprintf and strtoul, and
an include of unwind.h, I don't believe there is much else that is specific to UNIX. These may even exist in your platform's
headers. The structures/APIs defined in unwind.h are fully defined and useable as is in