From adca5a1f92d9ae05361129c06b24564d3ae5d5c3 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Thu, 15 May 2014 19:43:46 +0200 Subject: [PATCH] Skip handleMalloc properly. --- malloctrace.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/malloctrace.cpp b/malloctrace.cpp index 436151a..13689bf 100644 --- a/malloctrace.cpp +++ b/malloctrace.cpp @@ -89,9 +89,11 @@ void print_caller() unw_cursor_t cursor; unw_init_local (&cursor, &uc); - // skip malloc - if (unw_step(&cursor) <= 0) { - return; + // skip handleMalloc & malloc + for (int i = 0; i < 2; ++i) { + if (unw_step(&cursor) <= 0) { + return; + } } auto& ipCache = threadData.ipCache; -- 2.7.4