Exceptions in ARM

Iain Buclaw ibuclaw at gdcproject.org
Wed Jan 8 05:12:21 PST 2014


On 8 January 2014 08:37, Timo Sintonen <t.sintonen at luukku.com> wrote:
> On Sunday, 5 January 2014 at 10:21:36 UTC, Timo Sintonen wrote:
>>
>> On Sunday, 5 January 2014 at 10:06:48 UTC, Johannes Pfau wrote:
>>
>>> I should really start pushing my local ARM changes upstream. Here's a
>>> fix for the EABI unwinder:
>>>
>>> https://github.com/jpf91/GDC/commit/262e432e95cbe31a6764cd337f64022a56011eda
>>>
>>> IIRC I also thought the code in gcc/deh.d wasn't correct. As it wouldn't
>>> work for the eabi unwinder anyway (no Phase1Info member) I didn't
>>> investigate that though.
>>
>>
>> Meanwhile I got it to pass with this:
>> align(8) int _pad;
>>
> Exceptions still not working. The code call the unwind routine in libgcc but
> that never calls back to personality routine. Neither it resumes to the
> error callback nor abort.
>

Hmm, could maybe try some alignment test:

struct test
{
  byte space;
  byte[0] end;
}

struct OurUnwindException
{
...
  enum UNWIND_PAD = (Object.sizeof < test.sizeof)
      ? test.sizeof - Object.sizeof : 0;

  byte[UNWIND_PAD] _pad;

  Object obj;
...
}

Will have to take a relook at the unwind code again sometime incase
there has been changes since it was last updated.

Regards
Iain


More information about the D.gnu mailing list