X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cc;h=737214da96347dc62763ff4750117b18d406902a;hb=a1fdb7bb122f0b05be809a922d4b7ef5e125fa67;hp=a65123952012cbb761bff714d91542fb759e1648;hpb=be33ff96c5b89738694da272d8610564cce48bfb;p=senf.git diff --git a/Utils/Exception.cc b/Utils/Exception.cc index a651239..737214d 100644 --- a/Utils/Exception.cc +++ b/Utils/Exception.cc @@ -30,12 +30,7 @@ #include #include #include "../config.hh" - -// Copied from the binutils sources -#define HAVE_DECL_BASENAME 1 -#define HAVE_DECL_ASPRINTF 1 -#define HAVE_DECL_VASPRINTF 1 -#include "impl/demangle.h" +#include "Backtrace.hh" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// @@ -48,30 +43,12 @@ prefix_ void senf::ExceptionMixin::addBacktrace() { void * entries[SENF_DEBUG_BACKTRACE_NUMCALLERS]; unsigned nEntries( ::backtrace(entries, SENF_DEBUG_BACKTRACE_NUMCALLERS) ); - char ** symbols = ::backtrace_symbols(entries, nEntries); - + std::stringstream ss; ss << "\nException at\n"; - for (unsigned i=0; i