7 #include "stacktrace.h"
9 #define MAX_TRACE_LEN 100
11 #define CONFIG_STACKTRACE
12 /** Print a backtrace of the current program state. */
13 void print_trace(void)
15 #ifdef CONFIG_STACKTRACE
16 print_stacktrace(stdout);
18 void *array[MAX_TRACE_LEN];
22 size = backtrace(array, MAX_TRACE_LEN);
23 strings = backtrace_symbols(array, size);
25 printf("\nDumping stack trace (%d frames):\n", size);
27 for (i = 0; i < size; i++)
28 printf("\t%s\n", strings[i]);
31 #endif /* CONFIG_STACKTRACE */
34 void model_print_summary(void)
36 model->print_summary();
39 void assert_hook(void)
41 printf("Add breakpoint to line %u in file %s.\n",__LINE__,__FILE__);