exception handling problem: gcc on Cygwin for i960
Artem Alimarine
aalimari@best.ms.philips.com
Fri Aug 20 05:13:00 GMT 1999
Hello,
With help of the information on the mailing list and in the faqs I have
finally managed to build cross compiler on Cygwin for i960-coff (for
VxWorks).
Now I have a problem with C++ exceptions. I am a newbie in VxWorks (and
in embedded systems).
C programs seem to work fine. C++ programs work unless they use throw
statements to throw
exceptions.
Throw causes the system to hang.
Since in VxWorks a function is run directly (not by means of main() or
crt0), the problem might be
that the exception handling is not initialized.
How do I initialize exception handlinhg?
Or more generically, how do I make exception handling to work in this
situation?
Any help is appresiated
The configuration:
gcc-2.95 on Cygwin for i960-unknown-coff
binutils-2.9.1
newlib-1.8.1
VxWorks 5.1
The program:
#include <stdio.h>
void hello1() {
try {
printf("Hello, World\n");
throw 1; // this causes the system to hang
// without throw it works as expected
}
catch(...) {
printf("exception\n");
}
printf("exiting\n");
}
Thanks in advance
Artiom
Artem Alimarine
<aalimari@best.ms.phi
More information about the crossgcc
mailing list