|
From: <sv...@va...> - 2009-11-12 13:19:57
|
Author: tom
Date: 2009-11-12 13:19:41 +0000 (Thu, 12 Nov 2009)
New Revision: 10938
Log:
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.
Modified:
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/m_stacktrace.c
===================================================================
--- trunk/coregrind/m_stacktrace.c 2009-11-11 19:22:05 UTC (rev 10937)
+++ trunk/coregrind/m_stacktrace.c 2009-11-12 13:19:41 UTC (rev 10938)
@@ -430,9 +430,9 @@
# 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]);
|
|
From: Bart V. A. <bar...@gm...> - 2009-11-13 11:43:55
|
On Thu, Nov 12, 2009 at 2:19 PM, <sv...@va...> wrote:
> Author: tom
> Date: 2009-11-12 13:19:41 +0000 (Thu, 12 Nov 2009)
> New Revision: 10938
>
> Log:
> 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.
>
>
> Modified:
> trunk/coregrind/m_stacktrace.c
>
>
> Modified: trunk/coregrind/m_stacktrace.c
> ===================================================================
> --- trunk/coregrind/m_stacktrace.c 2009-11-11 19:22:05 UTC (rev 10937)
> +++ trunk/coregrind/m_stacktrace.c 2009-11-12 13:19:41 UTC (rev 10938)
> @@ -430,9 +430,9 @@
> # 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]);
>
Hello Tom,
This patch looks like an improvement -- e.g.
memcheck/tests/varinfo2.stderr.diff and
memcheck/tests/varinfo4.stderr.diff became smaller thanks to this
patch. But as you can see in e.g. memcheck/tests/varinfo1.stderr.diff,
unfortunately the off-by-one line number problem in the call stacks
reported on PPC still exists.
Was this the intended effect of this patch ?
Bart.
|
|
From: Tom H. <to...@co...> - 2009-11-13 11:50:01
|
On 13/11/09 11:43, Bart Van Assche wrote: > This patch looks like an improvement -- e.g. > memcheck/tests/varinfo2.stderr.diff and > memcheck/tests/varinfo4.stderr.diff became smaller thanks to this > patch. But as you can see in e.g. memcheck/tests/varinfo1.stderr.diff, > unfortunately the off-by-one line number problem in the call stacks > reported on PPC still exists. > > Was this the intended effect of this patch ? You know that's what expected - Jakub said as much on the bug and you replied saying that a fix for the off by one thing would be welcome. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |