aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2011-02-21 14:59:34 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2011-02-21 14:59:34 +0000
commitb5db5dfca6f92992b540eaf2fac00f4340f64fa9 (patch)
treec4ab1907a70bec7cfe1180c08f523f237f979eac /gdb
parentb800ec70e34b8115b645deea9f661a1769149c0a (diff)
downloadgdb-b5db5dfca6f92992b540eaf2fac00f4340f64fa9.zip
gdb-b5db5dfca6f92992b540eaf2fac00f4340f64fa9.tar.gz
gdb-b5db5dfca6f92992b540eaf2fac00f4340f64fa9.tar.bz2
* breakpoint.c (update_watchpoint): Do not attempt to recreate
per-frame locations while within a function epilogue.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c20
2 files changed, 19 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 94eaa93..3e67deb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-21 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.c (update_watchpoint): Do not attempt to recreate
+ per-frame locations while within a function epilogue.
+
2011-02-21 Pierre Muller <muller@ics.u-strasbg.fr>
* ser-mingw.c (ser_windows_close): Reformat comment to better conform
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c9e149b..27fbcc6 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1369,11 +1369,6 @@ update_watchpoint (struct breakpoint *b, int reparse)
if (!watchpoint_in_thread_scope (b))
return;
- /* We don't free locations. They are stored in the bp_location array
- and update_global_location_list will eventually delete them and
- remove breakpoints if needed. */
- b->loc = NULL;
-
if (b->disposition == disp_del_at_next_stop)
return;
@@ -1384,7 +1379,15 @@ update_watchpoint (struct breakpoint *b, int reparse)
within_current_scope = 1;
else
{
- struct frame_info *fi;
+ struct frame_info *fi = get_current_frame ();
+ struct gdbarch *frame_arch = get_frame_arch (fi);
+ CORE_ADDR frame_pc = get_frame_pc (fi);
+
+ /* If we're in a function epilogue, unwinding may not work
+ properly, so do not attempt to recreate locations at this
+ point. See similar comments in watchpoint_check. */
+ if (gdbarch_in_function_epilogue_p (frame_arch, frame_pc))
+ return;
/* Save the current frame's ID so we can restore it after
evaluating the watchpoint expression on its own frame. */
@@ -1400,6 +1403,11 @@ update_watchpoint (struct breakpoint *b, int reparse)
select_frame (fi);
}
+ /* We don't free locations. They are stored in the bp_location array
+ and update_global_location_list will eventually delete them and
+ remove breakpoints if needed. */
+ b->loc = NULL;
+
if (within_current_scope && reparse)
{
char *s;