OSDN Git Service

2003-02-20 Andrew Cagney <ac131313@redhat.com>
authorcagney <cagney>
Thu, 20 Feb 2003 13:43:13 +0000 (13:43 +0000)
committercagney <cagney>
Thu, 20 Feb 2003 13:43:13 +0000 (13:43 +0000)
* 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.

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/remote.c

index c4e81e6..c1a8533 100644 (file)
@@ -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
index abd5de9..f00c495 100644 (file)
@@ -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
index c260102..9e9a0b8 100644 (file)
@@ -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
 
index d47dad7..5edea01 100644 (file)
@@ -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,