2 * We use printf() here instead of C++ traditional cout because linking in cout
3 * increases executable size up to 3 megabytes (!!!), making it difficult to
4 * disassemble it. Anyway our aim is to test exceptions.
12 #include <exec/alerts.h>
13 #include <proto/exec.h>
15 extern void *__eh_frame_start
;
18 * Non-working call frame unwinding in AROS causes calling abort().
19 * Here we manually override this function to call Alert(),
20 * which can give us a stack trace.
24 printf("abort() called\n");
28 /* Calling exit here makes this a noreturn function
29 * avoiding a compiler warning. */
35 /* Just to make things a little bit more complex. */
38 printf("sub() entered\n");
46 printf("Exception frames start at %p\n", &__eh_frame_start
);
55 printf("An exception occurred. Exception Nr. %d\n", e
);