This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stdcall lib functions with exception throwing callbacks vs Dwarf2 EH


Richard Henderson wrote:
> On Wed, Nov 24, 2004 at 11:27:11AM +1300, Danny Smith wrote:
>> Before I pull any more hair out trying, does any one have any hints
>> on how to use an MD_FALLBACK_FRAME_STATE_FOR to workaround ...
>
> That would be wrong.
>
> I think the most likely explanation is that there's a bug in the
> dwarf2 generator for stdcall functions with -fomit-frame-pointer,
> and the problem should be attacked there.
>
> If you've got a call that takes 12 bytes of arguments on the stack
> and pop them on return, then the unwind info should look like
>
> # DW_CFA_GNU_args_size 12
> call foo
> # DW_CFA_def_cfa_offset <previous value - 12>
>
>

Umm, actually I don't think it is stdcall thing at all.

When I reran the testcase after doing other things both the cdecl and
stdcall functions resulted in uncaught exceptions, I can't explain the
success with cdecl in my earlier report,

Sorry for the noise.

If I compile the callback-using library code with -fexceptions using a
DW2 enabled compiler, then both calling conventions work, as expected.

So is it a general requirements of DW2 EH that functions that are passed
callbacks as args  be compiled with -fexceptions,  if the callbacks may
throw?  I don't see how else they could work

Danny

> r~


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]