]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* breakpoint.c (watchpoint_check): Double-check the found frame.
authorDaniel Jacobowitz <drow@false.org>
Mon, 18 Dec 2006 22:10:13 +0000 (22:10 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 18 Dec 2006 22:10:13 +0000 (22:10 +0000)
gdb/ChangeLog
gdb/breakpoint.c

index 084534e9a31c66ccd31548ab12c400bb9fa77b6c..bf28d52a0fcb3287150307907bf698fdeafaa273 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * breakpoint.c (watchpoint_check): Double-check the found frame.
+
 2006-12-17  Nick Hudson  <skrll@netbsd.org>
            Mark Kettenis  <kettenis@gnu.org>
 
index e68878b05f65067669576d76836e4c16857ccc94..ed91c1e0b6faba8d362e177f71cc727221750d80 100644 (file)
@@ -2564,6 +2564,13 @@ watchpoint_check (void *p)
       reinit_frame_cache ();
       fr = frame_find_by_id (b->watchpoint_frame);
       within_current_scope = (fr != NULL);
+
+      /* If we've gotten confused in the unwinder, we might have
+        returned a frame that can't describe this variable.  */
+      if (within_current_scope
+         && block_function (b->exp_valid_block) != get_frame_function (fr))
+       within_current_scope = 0;
+
       /* in_function_epilogue_p() returns a non-zero value if we're still
         in the function but the stack frame has already been invalidated.
         Since we can't rely on the values of local variables after the