On 23 September 2014 23:56, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On 9/23/2014 3:45 PM, Andrei Alexandrescu wrote: >> >> On 9/23/14, 3:15 PM, Iain Buclaw via Digitalmars-d wrote: >>> >>> On 23 September 2014 22:29, deadalnix via Digitalmars-d >>> <digitalmars-d@puremagic.com> wrote: >>>> >>>> On Tuesday, 23 September 2014 at 17:37:42 UTC, Andrei >>>> Alexandrescu wrote: >>>>> >>>>> >>>>> We need a libunwind expert to figure out a good approach for handling >>>>> exceptions thrown by C++ code into D. >>>>> >>>>> Is anyone fluent with libunwind? >>>>> >>>>> >>>>> Andrei >>>> >>>> >>>> >>>> https://github.com/deadalnix/libsdrt/blob/master/src/d/rt/eh.d >>> >>> >>> >>> https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/gcc/deh.d >>> >>> >>> :o) >> >> >> Noice. How difficult would be to port this to dmd/Linux? This is big - we >> need >> to get it done, and soon. >> >> Andrei > > > There is a problem, that code is gpl licensed. It may not actually matter, > since this code is only to interface with gpl libraries, but we should be > careful.
As well as the license, there's also two technical details that need to be addressed to fit with the features of dmd EH. 1) Exception chaining - still on my todo 2) OOM exceptions could be handled better. By all means, I'm happy with you to use it as a point of reference. What you'll find is that pretty much all GCC frontend personality routines are essentially identical, barring the of handling it's own exception object / data. Iain.