From: Florian Krohm Date: Mon, 23 Jul 2012 15:40:41 +0000 (+0000) Subject: Pass first_ip_delta to VG_(record_depth_1_ExeContext) as the function X-Git-Tag: svn/VALGRIND_3_8_0~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a06dcf872f51a3d1c087f06e067b8506b67443;p=thirdparty%2Fvalgrind.git Pass first_ip_delta to VG_(record_depth_1_ExeContext) as the function cannot figure it out by itself. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12775 --- diff --git a/coregrind/m_execontext.c b/coregrind/m_execontext.c index ec01513176..ebacc272e7 100644 --- a/coregrind/m_execontext.c +++ b/coregrind/m_execontext.c @@ -428,8 +428,9 @@ ExeContext* VG_(record_ExeContext)( ThreadId tid, Word first_ip_delta ) { False/*!first_ip_only*/ ); } -ExeContext* VG_(record_depth_1_ExeContext)( ThreadId tid ) { - return record_ExeContext_wrk( tid, 0/*first_ip_delta*/, +ExeContext* VG_(record_depth_1_ExeContext)( ThreadId tid, Word first_ip_delta ) +{ + return record_ExeContext_wrk( tid, first_ip_delta, True/*first_ip_only*/ ); } diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index 44774beb2d..700e1c90f8 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -1661,7 +1661,8 @@ static void default_action(const vki_siginfo_t *info, ThreadId tid) ExeContext* ec = VG_(am_is_valid_for_client) (VG_(get_SP)(tid), sizeof(Addr), VKI_PROT_READ) ? VG_(record_ExeContext)( tid, 0/*first_ip_delta*/ ) - : VG_(record_depth_1_ExeContext)( tid ); + : VG_(record_depth_1_ExeContext)( tid, + 0/*first_ip_delta*/ ); vg_assert(ec); VG_(pp_ExeContext)( ec ); } diff --git a/include/pub_tool_execontext.h b/include/pub_tool_execontext.h index 13df96306c..fdbf2c0cd1 100644 --- a/include/pub_tool_execontext.h +++ b/include/pub_tool_execontext.h @@ -67,7 +67,7 @@ ExeContext* VG_(record_ExeContext) ( ThreadId tid, Word first_ip_delta ); // might cause a segfault. In this case we can at least safely // produce a one-element stack trace, which is better than nothing. extern -ExeContext* VG_(record_depth_1_ExeContext)( ThreadId tid ); +ExeContext* VG_(record_depth_1_ExeContext)(ThreadId tid, Word first_ip_delta); // Apply a function to every element in the ExeContext. The parameter 'n' // gives the index of the passed ip. Doesn't go below main() unless