[Home]

Summary:ASTERISK-05046: [patch] [post 1.2] Inline backtraces
Reporter:Tilghman Lesher (tilghman)Labels:
Date Opened:2005-09-10 15:23:58Date Closed:2005-12-26 23:25:25.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20051201__inline_backtraces.diff.txt
Description:Code to implement ast_backtrace() which prints a stack backtrace to the logs.

****** ADDITIONAL INFORMATION ******

REQUIRES that code optimization be set to -O1 or lower.  WILL NOT WORK at higher optimization levels.
Comments:By: Tilghman Lesher (tilghman) 2005-09-10 15:33:31

Oh, I should note that this is specific to platforms which are using glibc (i.e. Linux).

By: Michael Jerris (mikej) 2005-09-10 15:37:22

Do we need to wrap +#include <execinfo.h> in an ifdef as well?

By: Tilghman Lesher (tilghman) 2005-09-10 17:34:50

Oh, probably.

By: Olle Johansson (oej) 2005-11-17 13:29:27.000-0600

Maybe change the

ast_log(LOG_WARNING, "Must compile with gcc optimizations at -O1 or lower for stack backtraces\n");

to

"Only works on Linux with gcc optimizations at -O1 or lower for stack backtraces"

By: Tilghman Lesher (tilghman) 2005-11-17 20:03:40.000-0600

oej:  ast_backtrace() will never be used in CVS.  It is simply there to allow us to obtain easy backtraces during a debugging session.

By: Tilghman Lesher (tilghman) 2005-12-01 14:22:23.000-0600

Changed patch to take advantage of the 'dont-optimize' Makefile target, and added a more meaningful message for non-Linux platforms.