|
From: <sv...@va...> - 2015-05-31 15:18:43
|
Author: philippe
Date: Sun May 31 16:18:36 2015
New Revision: 15300
Log:
Improve tracing in amd64 unwind
Modified:
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Sun May 31 16:18:36 2015
@@ -466,7 +466,7 @@
const UnwindStartRegs* startRegs,
Addr fp_max_orig )
{
- Bool debug = False;
+ const Bool debug = False;
Int i;
Addr fp_max;
UInt n_found = 0;
@@ -520,6 +520,9 @@
if (sps) sps[0] = uregs.xsp;
if (fps) fps[0] = uregs.xbp;
i = 1;
+ if (debug)
+ VG_(printf)(" ipsS[%d]=%#08lx rbp %#08lx rsp %#08lx\n",
+ i-1, ips[i-1], uregs.xbp, uregs.xsp);
# if defined(VGO_darwin)
if (VG_(is_valid_tid)(tid_if_known) &&
@@ -568,7 +571,8 @@
if (fps) fps[i] = uregs.xbp;
ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */
if (debug)
- VG_(printf)(" ipsC[%d]=%#08lx\n", i-1, ips[i-1]);
+ VG_(printf)(" ipsC[%d]=%#08lx rbp %#08lx rsp %#08lx\n",
+ i-1, ips[i-1], uregs.xbp, uregs.xsp);
uregs.xip = uregs.xip - 1; /* as per comment at the head of this loop */
if (UNLIKELY(cmrf > 0)) {RECURSIVE_MERGE(cmrf,ips,i);};
continue;
|