From: mquinson Date: Wed, 12 Dec 2007 20:27:23 +0000 (+0000) Subject: Output cleanups for when the exception arises in a separate thread X-Git-Tag: v3.3~727 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/00b32754b866aa931c74b2666e401dc7e2f83af5?ds=sidebyside Output cleanups for when the exception arises in a separate thread git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5121 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/ex.c b/src/xbt/ex.c index 58046beb2d..c331605171 100644 --- a/src/xbt/ex.c +++ b/src/xbt/ex.c @@ -297,18 +297,17 @@ void xbt_ex_setup_backtrace(xbt_ex_t *e) { free(addrs[i]); /* Mask the bottom of the stack */ - if (!strncmp("main",line_func,strlen("main"))) { - int j; - for (j=i+1; jused; j++) - free(addrs[j]); - e->used = i+1; - } - - if (!strncmp("__context_wrapper",line_func,strlen("__context_wrapper"))) { + if (!strncmp("main",line_func,strlen("main")) || + !strncmp("xbt_thread_context_wrapper",line_func,strlen("xbt_thread_context_wrapper"))) { int j; for (j=i+1; jused; j++) free(addrs[j]); e->used = i; + + if (!strncmp("xbt_thread_context_wrapper",line_func,strlen("xbt_thread_context_wrapper"))) { + e->used++; + e->bt_strings[i] = bprintf("** (in a separate thread)"); + } }