J
Jacek Dziedzic
Hi!
<OT, background>
I am in a situation where I use two compilers from different
vendors to compile my program. It seems that recently, due to
a misconfiguration, library conflict or my ignorance, with one
of the compilers I am having trouble related to libuwind.so,
which, to my knowledge, deals with the intricacies of unwinding
the stack upon an exception. Executables compiled with this
compiler crash with a SEGV after throw(), never reaching catch(),
going through likes of _Unwind_ApplyVirtualRule just before they
die. Perhaps it's because throw()'s are located in a library
and are "caught()" in the main program.
</OT>
Now, for the C++ question...
Anyway, before I resolve this issue I'd like to obtain
a behaviour as-if "every throw statement wrote to a log file,
before actually throwing". Is there a kludge way to do it?
I tried an ugly trick of re#defining throw to something like
Assert(...),throw
but then the preprocessor replaces the word "throw" in
exception specifications too.
Trying to wrap all throws into some throw_ functions
seems like a lot of work. Perhaps there's an easy solution?
TIA,
- J.
<OT, background>
I am in a situation where I use two compilers from different
vendors to compile my program. It seems that recently, due to
a misconfiguration, library conflict or my ignorance, with one
of the compilers I am having trouble related to libuwind.so,
which, to my knowledge, deals with the intricacies of unwinding
the stack upon an exception. Executables compiled with this
compiler crash with a SEGV after throw(), never reaching catch(),
going through likes of _Unwind_ApplyVirtualRule just before they
die. Perhaps it's because throw()'s are located in a library
and are "caught()" in the main program.
</OT>
Now, for the C++ question...
Anyway, before I resolve this issue I'd like to obtain
a behaviour as-if "every throw statement wrote to a log file,
before actually throwing". Is there a kludge way to do it?
I tried an ugly trick of re#defining throw to something like
Assert(...),throw
but then the preprocessor replaces the word "throw" in
exception specifications too.
Trying to wrap all throws into some throw_ functions
seems like a lot of work. Perhaps there's an easy solution?
TIA,
- J.