aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
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')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/doc/ChangeLog8
-rw-r--r--gdb/doc/gdb.texinfo22
-rw-r--r--gdb/remote.c21
4 files changed, 58 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c4e81e6..c1a8533 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2003-02-19 Raoul Gough <RaoulGough@yahoo.co.uk>
* coff-pe-read.c: New file - support reading of minimal symbols from a
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index abd5de9..f00c495 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2003-02-04 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c260102..9e9a0b8 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2514,6 +2514,8 @@ example, on the DSU, only two data breakpoints can be set at a time, and
@value{GDBN} will reject this command if more than two are used. Delete
or disable unused hardware breakpoints before setting new ones
(@pxref{Disabling, ,Disabling}). @xref{Conditions, ,Break conditions}.
+@xref{set remote hardware-breakpoint-limit}.
+
@kindex thbreak
@item thbreak @var{args}
@@ -2750,6 +2752,8 @@ when a non-current thread's activity changes the expression. (Hardware
watchpoints, in contrast, watch an expression in all threads.)
@end quotation
+@xref{set remote hardware-watchpoint-limit}.
+
@node Set Catchpoints
@subsection Setting catchpoints
@cindex catchpoints, setting
@@ -10352,6 +10356,7 @@ is supported other than to try it.
@menu
* Server:: Using the gdbserver program
* NetWare:: Using the gdbserve.nlm program
+* Remote configuration:: Remote configuration
* remote stub:: Implementing a remote stub
@end menu
@@ -10524,6 +10529,23 @@ argument is a device name (usually a serial device, like
communications with the server via serial line @file{/dev/ttyb}.
@end table
+@node Remote configuration
+@section Remote configuration
+
+The following configuration options are available when debugging remote
+programs:
+
+@table @code
+@kindex set remote hardware-watchpoint-limit
+@kindex set remote hardware-breakpoint-limit
+@anchor{set remote hardware-watchpoint-limit}
+@anchor{set remote hardware-breakpoint-limit}
+@item set remote hardware-watchpoint-limit @var{limit}
+@itemx set remote hardware-breakpoint-limit @var{limit}
+Restrict @value{GDBN} to using @var{limit} remote hardware breakpoint or
+watchpoints. A limit of -1, the default, is treated as unlimited.
+@end table
+
@node remote stub
@section Implementing a remote stub
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,