]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge from branches/THUMB: track renaming of guest_R15 to guest_R15T.
authorJulian Seward <jseward@acm.org>
Sun, 22 Aug 2010 12:00:40 +0000 (12:00 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 22 Aug 2010 12:00:40 +0000 (12:00 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11278

coregrind/m_coredump/coredump-elf.c
coregrind/m_debugger.c
coregrind/m_initimg/initimg-linux.c
coregrind/m_sigframe/sigframe-arm-linux.c
coregrind/m_syswrap/syswrap-main.c

index b9ca8d2a94a0321bd0caf2b492d28b367002205d..c47562ed71be76a9b89a5a48bc9d5bcb5e4ca920 100644 (file)
@@ -340,7 +340,7 @@ static void fill_prstatus(const ThreadState *tst,
    regs->ARM_ip   = arch->vex.guest_R12;
    regs->ARM_sp   = arch->vex.guest_R13;
    regs->ARM_lr   = arch->vex.guest_R14;
-   regs->ARM_pc   = arch->vex.guest_R15;
+   regs->ARM_pc   = arch->vex.guest_R15T;
    regs->ARM_cpsr = LibVEX_GuestARM_get_cpsr( &((ThreadArchState*)arch)->vex );
 
 #else
index 309bf91c382667b8dfae188e11eabe58e507202f..76861031b69f3dead233e243306295275038f0cf 100644 (file)
@@ -223,7 +223,7 @@ static Int ptrace_setregs(Int pid, VexGuestArchState* vex)
    uregs.ARM_ip   = vex->guest_R12; 
    uregs.ARM_sp   = vex->guest_R13; 
    uregs.ARM_lr   = vex->guest_R14; 
-   uregs.ARM_pc   = vex->guest_R15
+   uregs.ARM_pc   = vex->guest_R15T;
    uregs.ARM_cpsr = LibVEX_GuestARM_get_cpsr(vex);
    return VG_(ptrace)(VKI_PTRACE_SETREGS, pid, NULL, &uregs);
 
index 115d4a40ab4947f71f5c875357400125d76ed4d4..19535039d8e8b53859ba68dd22013e23b303d1f8 100644 (file)
@@ -1025,8 +1025,8 @@ void VG_(ii_finalise_image)( IIFinaliseImageInfo iifii )
    VG_(memset)(&arch->vex_shadow1, 0, sizeof(VexGuestARMState));
    VG_(memset)(&arch->vex_shadow2, 0, sizeof(VexGuestARMState));
 
-   arch->vex.guest_R13 = iifii.initial_client_SP;
-   arch->vex.guest_R15 = iifii.initial_client_IP;
+   arch->vex.guest_R13  = iifii.initial_client_SP;
+   arch->vex.guest_R15T = iifii.initial_client_IP;
 
    /* This is just EABI stuff. */
    // FIXME jrs: what's this for?
index 11e01451d3753629206192aee0bba25b1a69fe17..01c1c058c48b913313ef86ae02020fde899d0668 100644 (file)
@@ -139,7 +139,7 @@ static void synth_ucontext( ThreadId tid, const vki_siginfo_t *si,
    SC2(ip,R12);
    SC2(sp,R13);
    SC2(lr,R14);
-   SC2(pc,R15);
+   SC2(pc,R15T);
 #  undef SC2
 
    sc->trap_no = trapno;
@@ -236,20 +236,20 @@ void VG_(sigframe_create)( ThreadId tid,
       tst->arch.vex.guest_R1 = (Addr)&rsf->info;
       tst->arch.vex.guest_R2 = (Addr)&rsf->sig.uc;
    }
-   else{
+   else {
       build_sigframe(tst, (struct sigframe *)sp, siginfo, siguc,
                              handler, flags, mask, restorer);
-    }
+   }
 
    VG_(set_SP)(tid, sp);
    VG_TRACK( post_reg_write, Vg_CoreSignal, tid, VG_O_STACK_PTR,
          sizeof(Addr));
-    tst->arch.vex.guest_R0  = sigNo; 
+   tst->arch.vex.guest_R0  = sigNo; 
 
-    if(flags & VKI_SA_RESTORER)
-        tst->arch.vex.guest_R14 = (Addr) restorer; 
+   if (flags & VKI_SA_RESTORER)
+       tst->arch.vex.guest_R14 = (Addr) restorer; 
 
-   tst->arch.vex.guest_R15 = (Addr) handler; /* R15 == PC */
+   tst->arch.vex.guest_R15T = (Addr) handler; /* R15 == PC */
 }
 
 
@@ -312,7 +312,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
    REST(ip,R12);
    REST(sp,R13);
    REST(lr,R14);
-   REST(pc,R15);
+   REST(pc,R15T);
 #  undef REST
 
    tst->arch.vex_shadow1 = priv->vex_shadow1;
@@ -323,8 +323,9 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
              
    if (VG_(clo_trace_signals))
       VG_(message)(Vg_DebugMsg,
-                   "vg_pop_signal_frame (thread %d): isRT=%d valid magic; PC=%#x",
-                   tid, has_siginfo, tst->arch.vex.guest_R15);
+                   "vg_pop_signal_frame (thread %d): "
+                   "isRT=%d valid magic; PC=%#x",
+                   tid, has_siginfo, tst->arch.vex.guest_R15T);
 
    /* tell the tools */
    VG_TRACK( post_deliver_signal, tid, sigNo );
index 91b3d29d1f2e3e6c2b800e622363be49d45f57e7..562ed58b717e0f798ccdc43bf2978ca559250d33 100644 (file)
@@ -1864,14 +1864,16 @@ void ML_(fixup_guest_state_to_restart_syscall) ( ThreadArchState* arch )
    }
 
 #elif defined(VGP_arm_linux)
-   arch->vex.guest_R15 -= 4;   // sizeof(arm instr)
+   // INTERWORKING FIXME.  This is certainly wrong.  Need to look at
+   // R15T to determine current mode, then back up accordingly.
+   arch->vex.guest_R15T -= 4;   // sizeof(arm instr)
    {
-      UChar *p = (UChar*)arch->vex.guest_R15;
+      UChar *p = (UChar*)arch->vex.guest_R15T;
 
       if ((p[3] & 0xF) != 0xF)
          VG_(message)(Vg_DebugMsg,
                       "?! restarting over syscall that is not syscall at %#llx %02x %02x %02x %02x\n",
-                      arch->vex.guest_R15 + 0ULL, p[0], p[1], p[2], p[3]);
+                      arch->vex.guest_R15T + 0ULL, p[0], p[1], p[2], p[3]);
 
       vg_assert((p[3] & 0xF) == 0xF);
    }