From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bergur Ragnarsson To: "'gdb@sourceware.cygnus.com'" Subject: enhancement suggestion: gdb backtrace library Date: Tue, 14 Aug 2001 03:42:00 -0000 Message-id: <315BAD7B721AD211898F00805F853FBF37A8C2@2.10.10.10.in-addr.arpa> X-SW-Source: 2001-08/msg00123.html 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