* 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.
+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
+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
@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}
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
@menu
* Server:: Using the gdbserver program
* NetWare:: Using the gdbserve.nlm program
+* Remote configuration:: Remote configuration
* remote stub:: Implementing a remote stub
@end menu
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
}
-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)
{
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;
}
{
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)
"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,