From: mquinson Date: Wed, 10 May 2006 08:16:22 +0000 (+0000) Subject: do not launch addr2line when we failed to find sensible arguments for it X-Git-Tag: v3.3~3156 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/696ee2a4af4489387e1557a5bd4bcc523d56ff04?ds=inline do not launch addr2line when we failed to find sensible arguments for it git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2202 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/ex.c b/src/xbt/ex.c index b29414db85..f5a7969b52 100644 --- a/src/xbt/ex.c +++ b/src/xbt/ex.c @@ -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. */