This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

enhancement suggestion: gdb backtrace library



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]