// if we can, demangle the
// function name
#ifdef HAVE_LIBSTDCXX_DEMANGLER
- int status;
- char *realname;
-
- realname = abi::__cxa_demangle(functionname.c_str(), 0, 0, &status);
+ int status;
+ char *p = abi::__cxa_demangle(functionname.c_str(), 0, 0, &status);
+
if ((status == 0) && (functionname != "main"))
- stacktrace_entry = stacktrace_entry.substr(0, pos_start)
- +
- ": "
- +
- realname;
+ {
+ std::string realname(p);
+ // in MT mode, one often
+ // gets backtraces
+ // spanning several lines
+ // because we have so many
+ // boost::tuple arguments
+ // in the MT calling
+ // functions. most of the
+ // trailing arguments of
+ // these tuples are
+ // actually unused
+ // boost::tuples::null_type,
+ // so we should split them
+ // off if they are
+ // trailing a template
+ // argument list
+ while (realname.find (", boost::tuples::null_type>") != std::string::npos)
+ realname.erase (realname.find (", boost::tuples::null_type>"),
+ std::string (", boost::tuples::null_type").size());
+
+ stacktrace_entry = stacktrace_entry.substr(0, pos_start)
+ +
+ ": "
+ +
+ realname;
+ }
else
stacktrace_entry = stacktrace_entry.substr(0, pos_start)
+
+
functionname;
- // free memory allocated by
- // the demangler
- free (realname);
-
+ free (p);
+
#else
stacktrace_entry = stacktrace_entry.substr(0, pos_start)
<h3>base</h3>
<ol>
+ <li> <p> Improved: Stack backtraces in multithreaded mode were often
+ very long and almost unreadable because the functions in
+ namespace <code>Threads</code> that are used to set up new
+ threads have long and awkward signatures. The output is now
+ filtered to make these backtraces easier to read.
+ <br>
+ (WB 2006/08/15)
+ </p>
+
<li> <p> New: The second argument to <code>Utilities::int_to_string</code>
can now be omitted, leading to a string that isn't zero padded at all.
<br>