RISC-V port
Luís Marques
luis at luismarques.eu
Thu May 24 14:45:26 UTC 2018
On Thursday, 24 May 2018 at 14:01:48 UTC, Luís Marques wrote:
> When an expection is thrown the function _d_throw_exception is
> called. In turn, it calls _Unwind_RaiseException. But that
> function fails, returning a high numeric value that isn't part
> of the expected return type enum (_Unwind_Reason_Code) values.
> So the D exception personality is never called, and the catch
> block is never executed. The only thing that is currently
> missing in the assembly is the CFI stack adjustment directives.
> But I don't think that's what's causing the problem, because 1)
> when those are missing in the C++ code basic exception handling
> still works, and 2) I've tried to manually add those to the
> assembly file and it makes no difference.
Clue: when I call __cxa_throw in D code instead of throwing
normally (i.e., calling _d_throw_exception), the D personality
handler *is* called. Which indicates that, indeed, the problem is
*not* in the generated assembly file. So I guess it's something
that _d_throw_exception does which isn't quite right, although I
can't see what.
More information about the digitalmars-d-ldc
mailing list