Jump to page: 1 26  
Page
Thread overview
Any libunwind experts n da house?
Sep 23, 2014
David Nadlinger
Sep 23, 2014
David Nadlinger
Sep 23, 2014
deadalnix
Sep 23, 2014
Walter Bright
Sep 23, 2014
Jason King
Sep 23, 2014
Walter Bright
Sep 23, 2014
Jacob Carlborg
Sep 23, 2014
Walter Bright
Sep 23, 2014
David Nadlinger
Sep 23, 2014
David Nadlinger
Sep 23, 2014
Iain Buclaw
Sep 24, 2014
Iain Buclaw
Sep 23, 2014
deadalnix
Sep 23, 2014
Iain Buclaw
Sep 23, 2014
Walter Bright
Sep 24, 2014
Iain Buclaw
Sep 24, 2014
IgorStepanov
Sep 24, 2014
Iain Buclaw
Sep 24, 2014
Sean Kelly
Sep 24, 2014
Iain Buclaw
Sep 24, 2014
deadalnix
Sep 24, 2014
Iain Buclaw
Sep 24, 2014
IgorStepanov
Sep 24, 2014
IgorStepanov
Sep 24, 2014
IgorStepanov
Sep 25, 2014
Kagamin
Sep 25, 2014
Kagamin
Sep 25, 2014
Kagamin
Sep 27, 2014
IgorStepanov
Sep 27, 2014
deadalnix
Sep 27, 2014
Jacob Carlborg
Sep 27, 2014
IgorStepanov
Sep 27, 2014
Jacob Carlborg
Sep 27, 2014
IgorStepanov
Sep 27, 2014
IgorStepanov
Sep 28, 2014
IgorStepanov
Sep 28, 2014
Jacob Carlborg
Sep 27, 2014
IgorStepanov
Sep 27, 2014
Iain Buclaw
Sep 27, 2014
IgorStepanov
Sep 27, 2014
Iain Buclaw
September 23, 2014
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
September 23, 2014
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?

More or less.

What exactly are your goals? I thought the options we have are fairly clear, as discussed a few days ago. At least, Amaury and I seemed to agree (both of us worked on EH recently). The main question to decide is whether you want to go down the catch-C++-exceptions-in-D rabbit hole.

David
September 23, 2014
On Tuesday, 23 September 2014 at 18:03:18 UTC, David Nadlinger 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?
> […]
> The main  question to decide is whether you want to go
> down the catch-C++-exceptions-in-D rabbit hole.

Let me also note that if you do, it's no longer a question of just libunwind, but also of C++ runtime internals. I assume your primary target is g++ on Linux x86/x86_64?

David
September 23, 2014
On 9/23/14, 11:03 AM, David Nadlinger 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?
>
> More or less.
>
> What exactly are your goals? I thought the options we have are fairly
> clear, as discussed a few days ago. At least, Amaury and I seemed to
> agree (both of us worked on EH recently). The main question to decide is
> whether you want to go down the catch-C++-exceptions-in-D rabbit hole.

I think we should explore that rabbit hole. In the interim, a simpler solution may work: a C++ exception can only be caught from within C++ code. If no handler, the program terminates reliably. -- Andrei
September 23, 2014
On 9/23/14, 11:06 AM, David Nadlinger wrote:
> On Tuesday, 23 September 2014 at 18:03:18 UTC, David Nadlinger 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?
>> […]
>> The main  question to decide is whether you want to go
>> down the catch-C++-exceptions-in-D rabbit hole.
>
> Let me also note that if you do, it's no longer a question of just
> libunwind, but also of C++ runtime internals. I assume your primary
> target is g++ on Linux x86/x86_64?

Yes. -- Andrei

September 23, 2014
On 9/23/2014 11:03 AM, David Nadlinger 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?
>
> More or less.
>
> What exactly are your goals? I thought the options we have are fairly clear, as
> discussed a few days ago. At least, Amaury and I seemed to agree (both of us
> worked on EH recently). The main question to decide is whether you want to go
> down the catch-C++-exceptions-in-D rabbit hole.

One goal is to have dmd use the g++ exception handling mechanism. But googling how that works, I find dead links, specs that are 15 years old accompanied by vague comments about it being "extended" and "look at the g++ source code", etc.

Are there any actual docs about how it works for x86? Or is it the usual "take apart the output of g++ and figure it out" that I usually wind up doing :-( ?

September 23, 2014
I believe pretty much anything *ix on 64-bit(at least) x86 (32-bit gets a
bit murkier due to historical issues) is using the same exception handling
ABI (which itself was based off the Itanic ABI):

http://www.x86-64.org/documentation/abi.pdf



On Tue, Sep 23, 2014 at 1:31 PM, Walter Bright via Digitalmars-d < digitalmars-d@puremagic.com> wrote:

> On 9/23/2014 11:03 AM, David Nadlinger 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?
>>>
>>
>> More or less.
>>
>> What exactly are your goals? I thought the options we have are fairly
>> clear, as
>> discussed a few days ago. At least, Amaury and I seemed to agree (both of
>> us
>> worked on EH recently). The main question to decide is whether you want
>> to go
>> down the catch-C++-exceptions-in-D rabbit hole.
>>
>
> One goal is to have dmd use the g++ exception handling mechanism. But googling how that works, I find dead links, specs that are 15 years old accompanied by vague comments about it being "extended" and "look at the g++ source code", etc.
>
> Are there any actual docs about how it works for x86? Or is it the usual "take apart the output of g++ and figure it out" that I usually wind up doing :-( ?
>
>


September 23, 2014
On 9/23/2014 11:58 AM, Jason King via Digitalmars-d wrote:
> I believe pretty much anything *ix on 64-bit(at least) x86 (32-bit gets a bit
> murkier due to historical issues) is using the same exception handling ABI
> (which itself was based off the Itanic ABI):
>
> http://www.x86-64.org/documentation/abi.pdf

Thanks, this contains part of the info.

September 23, 2014
On 2014-09-23 20:31, Walter Bright wrote:

> One goal is to have dmd use the g++ exception handling mechanism.

That would be cool. It's useful for Objective-C on x86-64 as well.

> But googling how that works, I find dead links, specs that are 15 years old
> accompanied by vague comments about it being "extended" and "look at the
> g++ source code", etc.
>
> Are there any actual docs about how it works for x86? Or is it the usual
> "take apart the output of g++ and figure it out" that I usually wind up
> doing :-( ?

From the LLVM docs [1]:

A more complete description of the Itanium ABI exception handling runtime support of can be found at Itanium C++ ABI: Exception Handling [2]. A description of the exception frame format can be found at Exception Frames [3], with details of the DWARF 4 specification at DWARF 4 Standard [4]. A description for the C++ exception table formats can be found at Exception Handling Tables [5].

[1] http://llvm.org/docs/ExceptionHandling.html#itanium-abi-zero-cost-exception-handling

[2] http://mentorembedded.github.com/cxx-abi/abi-eh.html

[3] http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html

[4] http://dwarfstd.org/Dwarf4Std.php

[5] http://mentorembedded.github.com/cxx-abi/exceptions.pdf

-- 
/Jacob Carlborg
September 23, 2014
On 9/23/2014 12:57 PM, Jacob Carlborg wrote:
>  From the LLVM docs [1]:

Thank you. This is helpful.

« First   ‹ Prev
1 2 3 4 5 6