From: Daniel Jacobowitz Date: Mon, 18 Dec 2006 22:10:13 +0000 (+0000) Subject: * breakpoint.c (watchpoint_check): Double-check the found frame. X-Git-Tag: drow-reverse-20070409-branchpoint~1046 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69fbadd53d1404744d3e6032c42397c894d66be3;p=thirdparty%2Fbinutils-gdb.git * breakpoint.c (watchpoint_check): Double-check the found frame. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 084534e9a31..bf28d52a0fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2006-12-18 Daniel Jacobowitz + + * breakpoint.c (watchpoint_check): Double-check the found frame. + 2006-12-17 Nick Hudson Mark Kettenis diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e68878b05f6..ed91c1e0b6f 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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