From: Tom Hughes Date: Thu, 12 Nov 2009 13:19:41 +0000 (+0000) Subject: Fix stack unwinding on PPC to store the correct frame pointer for X-Git-Tag: svn/VALGRIND_3_6_0~474 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ecb11ce23a5db1913a235a6664c289195577610;p=thirdparty%2Fvalgrind.git Fix stack unwinding on PPC to store the correct frame pointer for 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 --- diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 42e0b978d8..8aafb6f066 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -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]);