]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
On ARM, request precise exceptions for R7. This is needed to
authorJulian Seward <jseward@acm.org>
Wed, 29 Sep 2010 21:36:56 +0000 (21:36 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 29 Sep 2010 21:36:56 +0000 (21:36 +0000)
get sane stack traces in Thumb code.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2052

VEX/priv/guest_arm_helpers.c

index e90d44e2c647100f0a46ebb45534a40cd23361d1..f6689a0c3dfad1eaef8e78b66d3226b6a6c114df 100644 (file)
@@ -635,7 +635,18 @@ Bool guest_arm_state_requires_precise_mem_exns ( Int minoff,
    Int r11_max = r11_min + 4 - 1;
 
    if (maxoff < r11_min || minoff > r11_max) {
-      /* no overlap with pc */
+      /* no overlap with r11 */
+   } else {
+      return True;
+   }
+
+   /* Ditto R7, particularly needed for proper stacktraces in Thumb
+      code. */
+   Int r7_min = offsetof(VexGuestARMState, guest_R7);
+   Int r7_max = r7_min + 4 - 1;
+
+   if (maxoff < r7_min || minoff > r7_max) {
+      /* no overlap with r7 */
    } else {
       return True;
    }