2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
7 * We use printf() here instead of C++ traditional cout because linking in cout
8 * increases executable size up to 3 megabytes (!!!), making it difficult to
9 * disassemble it. Anyway our aim is to test exceptions.
17 #include <exec/alerts.h>
18 #include <proto/exec.h>
20 extern void *__eh_frame_start
;
23 * Non-working call frame unwinding in AROS causes calling abort().
24 * Here we manually override this function to call Alert(),
25 * which can give us a stack trace.
29 printf("abort() called\n");
33 /* Calling exit here makes this a noreturn function
34 * avoiding a compiler warning. */
40 /* Just to make things a little bit more complex. */
43 printf("sub() entered\n");
51 printf("Exception frames start at %p\n", &__eh_frame_start
);
60 printf("An exception occurred. Exception Nr. %d\n", e
);