]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix stack unwinding on PPC to store the correct frame pointer for
authorTom Hughes <tom@compton.nu>
Thu, 12 Nov 2009 13:19:41 +0000 (13:19 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 12 Nov 2009 13:19:41 +0000 (13:19 +0000)
frames other than the first one found.

This is taken from Jakub Jelinek's second patch on bug #210479.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10938

coregrind/m_stacktrace.c

index 42e0b978d828657cfad19df6f71b041e0e1e6194..8aafb6f066ba18008d83c456931a23ff270b5a3f 100644 (file)
@@ -430,9 +430,9 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known,
 #           endif
 
             if (0 == ip || 1 == ip) break;
-            fp = (((UWord*)fp)[0]);
             if (sps) sps[i] = fp; /* NB. not sp */
             if (fps) fps[i] = fp;
+            fp = (((UWord*)fp)[0]);
             ips[i++] = ip - 1; /* -1: refer to calling insn, not the RA */
             if (debug)
                VG_(printf)("     ipsF[%d]=%#08lx\n", i-1, ips[i-1]);