|
From: <sv...@va...> - 2006-01-19 03:47:33
|
Author: sewardj
Date: 2006-01-19 03:47:30 +0000 (Thu, 19 Jan 2006)
New Revision: 5555
Log:
ppc64-linux: apply the bogus-LR kludge in a second place.
Modified:
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/m_stacktrace.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_stacktrace.c 2006-01-19 03:44:10 UTC (rev 5554)
+++ trunk/coregrind/m_stacktrace.c 2006-01-19 03:47:30 UTC (rev 5555)
@@ -240,6 +240,19 @@
/* fp is %r1. ip is %cia. Note, ppc uses r1 as both the stack and
frame pointers. */
=20
+# if defined(VGP_ppc64_linux)
+ /* Deal with bogus LR values caused by function
+ interception/wrapping; see comment on similar code a few lines
+ further down. */
+ if (lr =3D=3D (Addr)&VG_(ppc64_linux_magic_redirect_return_stub)
+ && VG_(is_valid_tid)(tid_if_known)) {
+ Long hsp =3D VG_(threads)[tid_if_known].arch.vex.guest_REDIR_SP;
+ if (hsp >=3D 1 && hsp < VEX_GUEST_PPC64_REDIR_STACK_SIZE)
+ lr =3D VG_(threads)[tid_if_known]
+ .arch.vex.guest_REDIR_STACK[hsp-1];
+ }
+# endif
+
lr_is_first_RA =3D False;
{
# define M_VG_ERRTXT 1000
|