enhancement suggestion: gdb backtrace library
Bergur Ragnarsson
Bergur.Ragnarsson@tern.is
Tue Aug 14 03:42:00 GMT 2001
The c-library assert(...) can quickly stop buggy logic and sometimes reveal
the cause by the single line error description. Often however a full stack
trace is needed to find the error.
It would be quite a productivity improvement if programmers could call a
function like
gdb_backtrace(options)
which would print up to 30 or so stack frames; this would allow the
programmer to go directly to fixing the code. This would also be great in
multithreaded code, where we often have been unable to produce stack traces.
The glibc-library has an backtrace(..) and backtrace_symbols(..), but these
functions didn't produce correct stack traces on our system.
Bergur Ragnarsson
More information about the Gdb
mailing list