aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-09-04 17:41:48 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-09-04 17:41:48 +0000
commita957e6420da570d74136f1af2c8ff925469d3a69 (patch)
tree647956d3fe2d9acd03239744fbcf9f258d2e993b /gdb
parenta6fbcf2f6af065087dc67f24d89cc75fc7e83fe3 (diff)
downloadgdb-a957e6420da570d74136f1af2c8ff925469d3a69.zip
gdb-a957e6420da570d74136f1af2c8ff925469d3a69.tar.gz
gdb-a957e6420da570d74136f1af2c8ff925469d3a69.tar.bz2
* breakpoint.c (watchpoint_check): Remove accidentally checked in
unused code. Add comment.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c18
2 files changed, 11 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 103b422..fe40552 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2003-09-04 Corinna Vinschen <vinschen@redhat.com>
+ * breakpoint.c (watchpoint_check): Remove accidentally checked in
+ unused code. Add comment.
+
+2003-09-04 Corinna Vinschen <vinschen@redhat.com>
+
* breakpoint.c (watchpoint_check): Check for pc being in an
epilogue if watchpoint frame couldn't be found.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 82e5b11..d09425e 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2408,24 +2408,18 @@ watchpoint_check (void *p)
the frame chain (so we can determine if we're in scope). */
reinit_frame_cache ();
fr = frame_find_by_id (b->watchpoint_frame);
-#if 0
- current_frame_id = get_frame_id (get_current_frame ());
- within_current_scope = frame_id_eq (current_frame_id, b->watchpoint_frame)
- || frame_id_inner (current_frame_id,
- b->watchpoint_frame);
-#else
within_current_scope = (fr != NULL);
-#endif
/* 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
stack has been destroyed, we are treating the watchpoint in that
- state as `not changed' without further checking. */
-#if 0
- if (within_current_scope && (!fr || fr == get_current_frame ())
-#else
+ state as `not changed' without further checking.
+
+ vinschen/2003-09-04: The former implementation left out the case
+ that the watchpoint frame couldn't be found by frame_find_by_id()
+ because the current PC is currently in an epilogue. Calling
+ gdbarch_in_function_epilogue_p() also when fr == NULL fixes that. */
if ((!within_current_scope || fr == get_current_frame ())
-#endif
&& gdbarch_in_function_epilogue_p (current_gdbarch, read_pc ()))
return WP_VALUE_NOT_CHANGED;
if (fr && within_current_scope)