X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6903f88b9cd26bb3c24c698fb04ec187f69a105a..8750e7f378b5d48477e1b0b2796a437366a3ea2b:/src/xbt/ex.c diff --git a/src/xbt/ex.c b/src/xbt/ex.c index 907d73ed30..f5a7969b52 100644 --- a/src/xbt/ex.c +++ b/src/xbt/ex.c @@ -48,7 +48,7 @@ void xbt_backtrace_display(void) { e.remote=0; xbt_ex_free(e); #else - fprintf(stderr,"No backtrace on this arch"); + ERROR0("No backtrace on this arch"); #endif } @@ -147,12 +147,15 @@ void xbt_ex_setup_backtrace(xbt_ex_t *e) { DEBUG4("%#lx %s [%#lx-%#lx]", addr, found? "in":"out of",first,last); } - if (!found) - CRITICAL0("Problem while reading the maps file"); - fclose(maps); free(maps_name); + if (!found) { + WARN0("Problem while reading the maps file"); + e->bt_strings[i] = bprintf("** In ?? (%s)", backtrace[i]); + continue; + } + /* Ok, Found the offset of the maps line containing the searched symbol. We now need to substract this from the address we got from backtrace. */ @@ -209,10 +212,11 @@ void xbt_ex_display(xbt_ex_t *e) { if (e->remote) bprintf(" on host %s(%ld)",e->host,e->pid); + CRITICAL1("%s",e->msg); fprintf(stderr, "** SimGrid: UNCAUGHT EXCEPTION received on %s(%ld): category: %s; value: %d\n" "** %s\n" - "** Thrown by %s()%s", + "** Thrown by %s()%s\n", gras_os_myname(),gras_os_getpid(), xbt_ex_catname(e->category), e->value, e->msg, e->procname,thrower?thrower:" in this process");