
Dave Steffen wrote:
Martin Wille writes:
Neal Becker wrote:
We discussed a couple of years back code to do tracebacks that did not require instrumenting, which IMO is much more interesting.
On linux/glibc, there is a function 'backtrace' that can help (libc manual, sec 33.1). We did talk about some code. Discussion bogged down on demangling symbols. At the time, the demangling code was not free (IIRC), but I think that is no longer a problem.
A stacktrace is helpful even without the demangling. In the worst case, one would have to run c++filt manually, which isn't that bad in a debugging scenario.
FWIW, GCC provides an API call that demangles names: something like "abi::__cxa_demangle", I don't remember the details.
Yes. When we first discussed this, that function was missing, and we got bogged down trying to work around it, but as I said, this should no longer be an issue.