aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-02-20 13:43:14 +0000
committerAndrew Cagney <cagney@redhat.com>2003-02-20 13:43:14 +0000
commit501eef1260d7e203ba1e555ba94ec918d7c32725 (patch)
tree839cdb7e0e1eb123daa2de793f2cdd22a8716a6a /gdb/remote.c
parent70bccea4c60d1f565f2abb68cf6061678ad009c3 (diff)
downloadgdb-501eef1260d7e203ba1e555ba94ec918d7c32725.zip
gdb-501eef1260d7e203ba1e555ba94ec918d7c32725.tar.gz
gdb-501eef1260d7e203ba1e555ba94ec918d7c32725.tar.bz2
2003-02-20 Andrew Cagney <ac131313@redhat.com>
* remote.c (_initialize_remote): Add commands "set/show remote hardware-watchpoint-limit" and "set/show remote hardware-breakpoint-limit". (remote_hw_watchpoint_limit): Initialize to -1. (remote_hw_breakpoint_limit): Ditto. (remote_check_watch_resources): Treat a limit of -1 as unlimited. Index: doc/ChangeLog 2003-02-20 Andrew Cagney <ac131313@redhat.com> * gdb.texinfo (Set Breaks): Add cross reference to "set remote hardware-breakpoint-limit". (Set Watchpoints): Add cross reference to "set remote hardware-watchpoint-limit". (Remote configuration options): New section.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index d47dad7..5edea01 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -4839,8 +4839,8 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
}
-int remote_hw_watchpoint_limit = 0;
-int remote_hw_breakpoint_limit = 0;
+int remote_hw_watchpoint_limit = -1;
+int remote_hw_breakpoint_limit = -1;
int
remote_check_watch_resources (int type, int cnt, int ot)
@@ -4849,6 +4849,8 @@ remote_check_watch_resources (int type, int cnt, int ot)
{
if (remote_hw_breakpoint_limit == 0)
return 0;
+ else if (remote_hw_breakpoint_limit < 0)
+ return 1;
else if (cnt <= remote_hw_breakpoint_limit)
return 1;
}
@@ -4856,6 +4858,8 @@ remote_check_watch_resources (int type, int cnt, int ot)
{
if (remote_hw_watchpoint_limit == 0)
return 0;
+ else if (remote_hw_watchpoint_limit < 0)
+ return 1;
else if (ot)
return -1;
else if (cnt <= remote_hw_watchpoint_limit)
@@ -6144,6 +6148,19 @@ terminating `#' character and checksum.",
"Show the maximum number of bytes per memory-read packet.\n",
&remote_show_cmdlist);
+ add_setshow_cmd ("hardware-watchpoint-limit", no_class,
+ var_zinteger, &remote_hw_watchpoint_limit, "\
+Set the maximum number of target hardware watchpoints.\n\
+Specify a negative limit for unlimited.", "\
+Show the maximum number of target hardware watchpoints.\n",
+ NULL, NULL, &remote_set_cmdlist, &remote_show_cmdlist);
+ add_setshow_cmd ("hardware-breakpoint-limit", no_class,
+ var_zinteger, &remote_hw_breakpoint_limit, "\
+Set the maximum number of target hardware breakpoints.\n\
+Specify a negative limit for unlimited.", "\
+Show the maximum number of target hardware breakpoints.\n",
+ NULL, NULL, &remote_set_cmdlist, &remote_show_cmdlist);
+
add_show_from_set
(add_set_cmd ("remoteaddresssize", class_obscure,
var_integer, (char *) &remote_address_size,