aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-10-29 16:33:42 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-10-31 12:52:35 +0000
commit638aa5a1bac0c3782b6c0a40a03743507c57741e (patch)
tree7dbd4728fcbe6856725d45b85772151c7ec3dde4 /gdb/breakpoint.c
parentdd0845d708ab82f931fd7b800b4d218842ed635f (diff)
downloadgdb-638aa5a1bac0c3782b6c0a40a03743507c57741e.zip
gdb-638aa5a1bac0c3782b6c0a40a03743507c57741e.tar.gz
gdb-638aa5a1bac0c3782b6c0a40a03743507c57741e.tar.bz2
Extra error message from update_watchpoint
https://sourceware.org/ml/gdb-patches/2013-10/msg00551.html gdb/ChangeLog * breakpoint.c (update_watchpoint): Update error message and add an additional error message. gdb/testsuite/ChangeLog * gdb.base/watchpoint.exp (test_no_hw_watchpoints): Add additional tests and update expected error message. (test_watch_register_location): New tests. (do_tests): Call test_watch_register_location. * gdb.base/watchpoints.exp: Update expected error message.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 608463d..1782c99 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1805,7 +1805,8 @@ update_watchpoint (struct watchpoint *b, int reparse)
if (b->base.ops->works_in_software_mode (&b->base))
b->base.type = bp_watchpoint;
else
- error (_("Software read/access watchpoints not supported."));
+ error (_("Can't set read/access watchpoint when "
+ "hardware watchpoints are disabled."));
}
}
else if (within_current_scope && b->exp)
@@ -1946,8 +1947,14 @@ update_watchpoint (struct watchpoint *b, int reparse)
}
}
else if (!b->base.ops->works_in_software_mode (&b->base))
- error (_("Expression cannot be implemented with "
- "read/access watchpoint."));
+ {
+ if (!can_use_hw_watchpoints)
+ error (_("Can't set read/access watchpoint when "
+ "hardware watchpoints are disabled."));
+ else
+ error (_("Expression cannot be implemented with "
+ "read/access watchpoint."));
+ }
else
b->base.type = bp_watchpoint;