[valgrind] 3.8.0-1
Jakub Jelinek
jakub at fedoraproject.org
Fri Aug 10 10:28:05 UTC 2012
commit 707b2affdbf155a04b40b00640783e8e60126d69
Author: Jakub Jelinek <jakub at redhat.com>
Date: Fri Aug 10 12:27:57 2012 +0200
3.8.0-1
valgrind-3.8.0-x86-backtrace.patch | 52 ++++++++++++++++++++++++++++++++++++
valgrind.spec | 4 +++
2 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/valgrind-3.8.0-x86-backtrace.patch b/valgrind-3.8.0-x86-backtrace.patch
new file mode 100644
index 0000000..fc9d055
--- /dev/null
+++ b/valgrind-3.8.0-x86-backtrace.patch
@@ -0,0 +1,52 @@
+--- valgrind-3.8.0/coregrind/m_stacktrace.c.jj 2012-08-05 18:04:16.000000000 +0200
++++ valgrind-3.8.0/coregrind/m_stacktrace.c 2012-08-10 12:13:46.069797051 +0200
+@@ -149,11 +149,23 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId
+ /* Try to derive a new (ip,sp,fp) triple from the current
+ set. */
+
+- /* On x86, first try the old-fashioned method of following the
+- %ebp-chain. Code which doesn't use this (that is, compiled
+- with -fomit-frame-pointer) is not ABI compliant and so
+- relatively rare. Besides, trying the CFI first almost always
+- fails, and is expensive. */
++ /* On x86 GCC 4.6 and later now defaults to -fomit-frame-pointer
++ together with emitting unwind info (-fasynchronous-unwind-tables).
++ So, try CF info first. */
++ if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) {
++ if (0 == uregs.xip || 1 == uregs.xip) break;
++ if (sps) sps[i] = uregs.xsp;
++ 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]=0x%08lx\n", i-1, ips[i-1]);
++ uregs.xip = uregs.xip - 1;
++ /* as per comment at the head of this loop */
++ continue;
++ }
++
++ /* And only then the old-fashioned method of following the
++ %ebp-chain. */
+ /* Deal with frames resulting from functions which begin "pushl%
+ ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */
+ if (fp_min <= uregs.xbp &&
+@@ -179,20 +191,6 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId
+ uregs.xip = uregs.xip - 1;
+ /* as per comment at the head of this loop */
+ continue;
+- }
+-
+- /* That didn't work out, so see if there is any CF info to hand
+- which can be used. */
+- if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) {
+- if (0 == uregs.xip || 1 == uregs.xip) break;
+- if (sps) sps[i] = uregs.xsp;
+- 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]=0x%08lx\n", i-1, ips[i-1]);
+- uregs.xip = uregs.xip - 1;
+- /* as per comment at the head of this loop */
+- continue;
+ }
+
+ /* And, similarly, try for MSVC FPO unwind info. */
diff --git a/valgrind.spec b/valgrind.spec
index d50ad4a..7f3a302 100644
--- a/valgrind.spec
+++ b/valgrind.spec
@@ -18,6 +18,7 @@ Patch7: valgrind-3.8.0-pie.patch
Patch8: valgrind-3.8.0-tests.patch
Patch9: valgrind-3.8.0-enable-armv5.patch
Patch10: valgrind-3.8.0-ldso-supp.patch
+Patch11: valgrind-3.8.0-x86-backtrace.patch
Obsoletes: valgrind-callgrind
%ifarch x86_64 ppc64
@@ -107,6 +108,7 @@ for details.
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
%build
CC=gcc
@@ -208,6 +210,8 @@ echo ===============END TESTING===============
- update to 3.8.0 release
- from CFLAGS/CXXFLAGS filter just fortification flags, not arch
specific flags
+- on i?86 prefer to use CFI over %ebp unwinding, as GCC 4.6+
+ defaults to -fomit-frame-pointer
* Tue Aug 07 2012 Mark Wielaard <mjw at redhat.com> 3.8.0-0.1.TEST1.svn12858
- Update to 3.8.0-TEST1
More information about the scm-commits
mailing list