Thomas Tutone wrote:
Larry I Smith wrote:
Joseph Turian wrote:
hmmm... so if I compile *without* -fomit-frame-pointer, I catch the
exception just fine.
Why is this?
Joseph
A frame is required for exception handling to work across function
calls.
Larry
I'm not sure I follow you. Are you suggesting that
-fomit-frame-pointer prevents exception handling across function calls?
It seems to work for me.
Best regards,
Tom
Perhaps it is hardware/OS related?
This snip from the GCC 'info' pages seems to suggest
the frame and exceptions are inter-related on some platforms.
`-fexceptions'
Enable exception handling. Generates extra code needed to
propagate exceptions. For some targets, this implies GCC will
generate frame unwind information for all functions, which can
produce significant data size overhead, although it does not
affect execution. If you do not specify this option, GCC will
enable it by default for languages like C++ which normally require
exception handling, and disable it for languages like C that do
not normally require it. However, you may need to enable this
option when compiling C code that needs to interoperate properly
with exception handlers written in C++. You may also wish to
disable this option if you are compiling older C++ programs that
don't use exception handling.
The OP's question should probably be directed to the newsgroup:
gnu.g++.help
Regards,
Larry