From c7293780b85ed128680c7a181cbb9822f95e76e1 Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Fri, 11 Jun 2010 18:04:54 +0000
Subject: [PATCH] Remove lines from the output related to the backtrace itself.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/logger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/logger.c b/main/logger.c
index cd7d7a3ed4..70a8771968 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -1134,8 +1134,8 @@ void ast_backtrace(void)
 
 	if ((strings = backtrace_symbols(bt->addresses, bt->num_frames))) {
 		ast_debug(1, "Got %d backtrace record%c\n", bt->num_frames, bt->num_frames != 1 ? 's' : ' ');
-		for (i = 0; i < bt->num_frames; i++) {
-			ast_log(LOG_DEBUG, "#%d: [%p] %s\n", i, bt->addresses[i], strings[i]);
+		for (i = 3; i < bt->num_frames - 2; i++) {
+			ast_log(LOG_DEBUG, "#%d: [%p] %s\n", i - 3, bt->addresses[i], strings[i]);
 		}
 
 		/* MALLOC_DEBUG will erroneously report an error here, unless we undef the macro. */
-- 
GitLab