[asterisk-commits] mmichelson: branch mmichelson/lock_backtraces r115073 - in /team/mmichelson/l...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 1 16:13:01 CDT 2008


Author: mmichelson
Date: Thu May  1 16:13:00 2008
New Revision: 115073

URL: http://svn.digium.com/view/asterisk?view=rev&rev=115073
Log:
Based on a suggestion from Brian Degenhardt, I am only storing the addresses of the stack frames.
We'll translate into the proper symbols when it comes time to print.


Modified:
    team/mmichelson/lock_backtraces/include/asterisk/logger.h
    team/mmichelson/lock_backtraces/main/logger.c

Modified: team/mmichelson/lock_backtraces/include/asterisk/logger.h
URL: http://svn.digium.com/view/asterisk/team/mmichelson/lock_backtraces/include/asterisk/logger.h?view=diff&rev=115073&r1=115072&r2=115073
==============================================================================
--- team/mmichelson/lock_backtraces/include/asterisk/logger.h (original)
+++ team/mmichelson/lock_backtraces/include/asterisk/logger.h Thu May  1 16:13:00 2008
@@ -233,7 +233,7 @@
 
 struct ast_bt *ast_bt_create(void);
 
-inline int ast_bt_populate(struct ast_bt *bt);
+inline int ast_bt_get_addresses(struct ast_bt *bt);
 
 void *ast_bt_destroy(struct ast_bt *bt);
 

Modified: team/mmichelson/lock_backtraces/main/logger.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/lock_backtraces/main/logger.c?view=diff&rev=115073&r1=115072&r2=115073
==============================================================================
--- team/mmichelson/lock_backtraces/main/logger.c (original)
+++ team/mmichelson/lock_backtraces/main/logger.c Thu May  1 16:13:00 2008
@@ -1155,13 +1155,9 @@
  * \retval 0 Success
  * \retval -1 Failure
  */
-inline int ast_bt_populate(struct ast_bt *bt)
+inline int ast_bt_get_addresses(struct ast_bt *bt)
 {
 	bt->num_frames = backtrace(bt->addresses, AST_MAX_BT_FRAMES);
-	if (!(bt->symbols = backtrace_symbols(bt->addresses, bt->num_frames))) {
-		ast_log(LOG_WARNING, "Unable to retrieve symbols for backtrace\n");
-		return -1;
-	}
 
 	return 0;
 }




More information about the asterisk-commits mailing list