Is there any way to know from where the C++ exception originates ?
strauman at slac.stanford.edu
Wed Sep 22 00:41:55 UTC 2004
Valery Pykhtin wrote:
>may be this is an unappropriate place to ask, but may be someone knows the
>answer in the topic ?
That's why we were taught 'never user GOTO' in the old days. C++ people
will probably tell you that you don't _have_ to know and start singing about
If I need to know, I set a breakpoint to __throw or similar (depends on
in the debugger. If you don't have debugger support on your RTEMS target
you can usually either patch your binary or use the linker's --wrap
hook into 'throw'. Write a little routine that dumps a stack trace and then
branches to the real 'throw'. If your application throws and handles a lot
of exceptions but you need to catch a 'fatal' one, let the hook routine
the stack trace to memory and print it on 'exit', or from a global
That's the easiest that comes to my mind.
More information about the users