+ fprintf(stderr, "The backtrace() function failed, which probably means that the memory is exhausted. Here is a crude dump of the exception that I was trying to build:");
+ fprintf(stderr, "%s(%d) [%s:%d] %s",
+ e->procname, e->pid, e->file, e->line, e->msg);
+ fprintf(stderr, "Bailing out now since there is nothing I can do without a decent amount of memory. Please go fix the memleaks\n");
+ exit(1);
+ }
}
-void xbt_ex_setup_backtrace(xbt_ex_t * e)
+void xbt_ex_setup_backtrace(xbt_ex_t * e) //FIXME: This code could be greatly improved/simplifyied with http://cairo.sourcearchive.com/documentation/1.9.4/backtrace-symbols_8c-source.html