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.

There does seem to be a  problem in the frame-pointer handling see:

With this testcase:
void __attribute__((stdcall)) test( int a) { a; }

 void snafu( void) {
      test( 666);
      throw 999;

 int main( void) {
      try {
          snafu( );
  return 0;
      } catch( ...) {
          return 1;

I get (today):

g++ -fno-omit-frame-pointer PASS (at all optimisation levels).

g++ -O{0|1|2} -fomit-frame-pointer -maccumulate-outgoing-args PASS.

g++  -O0 -mtune=i686  -mno-accumulate-outgoing-args -fomit-frame-pointer
g++ -O{1,2}  -mtune=i686  -mno-accumulate-outgoing-args -fomit-frame-poi
nter  PASS

The optimisation flags that cause failure has changed since the original
gcc report.


Unsubscribe info:
Problem reports:

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