* [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit
@ 2003-02-20 3:53 Andrew Cagney
2003-02-20 13:45 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2003-02-20 3:53 UTC (permalink / raw)
To: gdb-patches; +Cc: sjohnson
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
Hello,
This follows up a number of previous posts. It adds the commands:
set remote hardware-breakpoint-limit
set remote hardware-watchpoint-limit
show remote hardware-breakpoint-limit
show remote hardware-watchpoint-limit
A limit of -1 is infinite, zero is zero. It also uses the i18n friendly
add_setshow_cmd().
Eli, how is the doco?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4381 bytes --]
2003-02-19 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-19 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.
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.94
diff -u -r1.94 remote.c
--- remote.c 14 Nov 2002 00:25:03 -0000 1.94
+++ remote.c 20 Feb 2003 03:47:47 -0000
@@ -4839,8 +4839,8 @@
}
-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 @@
{
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 @@
{
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)
@@ -6143,6 +6147,19 @@
show_memory_read_packet_size,
"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,
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.147
diff -u -r1.147 gdb.texinfo
--- doc/gdb.texinfo 4 Feb 2003 22:52:51 -0000 1.147
+++ doc/gdb.texinfo 20 Feb 2003 03:47:49 -0000
@@ -2514,6 +2514,8 @@
@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 @@
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 @@
@menu
* Server:: Using the gdbserver program
* NetWare:: Using the gdbserve.nlm program
+* Remote configuration:: Remote configuration
* remote stub:: Implementing a remote stub
@end menu
@@ -10522,6 +10527,23 @@
@noindent
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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit
2003-02-20 3:53 [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit Andrew Cagney
@ 2003-02-20 13:45 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-02-20 13:45 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches, sjohnson
> 2003-02-19 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-19 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.
>
I've checked this in.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit
@ 2003-02-20 20:11 Zaretskii Eli
2003-02-20 13:05 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Zaretskii Eli @ 2003-02-20 20:11 UTC (permalink / raw)
To: Andrew Cagney, gdb-patches; +Cc: sjohnson
This message was scanned for viruses and other malicious code by PrivaWall.
This mail was sent from ELTA SYS LTD.
> From: Andrew Cagney [mailto:ac131313@redhat.com]
> Sent: Thursday, February 20, 2003 5:58 AM
>
> Eli, how is the doco?
Okay with me, but please see that the references to @anchor's look well
in the printed copy.
This message is processed by the PrivaWall Email Security Server.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit
2003-02-20 20:11 Zaretskii Eli
@ 2003-02-20 13:05 ` Andrew Cagney
2003-02-22 23:28 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2003-02-20 13:05 UTC (permalink / raw)
To: Zaretskii Eli; +Cc: gdb-patches, sjohnson
> This message was scanned for viruses and other malicious code by PrivaWall.
>
>
> This mail was sent from ELTA SYS LTD.
>
>
>
>> From: Andrew Cagney [mailto:ac131313@redhat.com]
>> Sent: Thursday, February 20, 2003 5:58 AM
>>
>> Eli, how is the doco?
>
>
> Okay with me, but please see that the references to @anchor's look well
> in the printed copy.
(ok)
Meta question, is there a shorthand way of doing this:
@kindex command
@anchor command
@index command
? Perhaphs a custom GDB @macro?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit
2003-02-20 13:05 ` Andrew Cagney
@ 2003-02-22 23:28 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2003-02-22 23:28 UTC (permalink / raw)
To: ac131313; +Cc: gdb-patches, sjohnson
> Date: Thu, 20 Feb 2003 08:10:41 -0500
> From: Andrew Cagney <ac131313@redhat.com>
>
> Meta question, is there a shorthand way of doing this:
>
> @kindex command
> @anchor command
> @index command
I don't think so.
> Perhaphs a custom GDB @macro?
I'd recommend against using @macro unless absolutely necessary.
Texinfo macros give you a lot of trouble when you TeX the manual.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-22 23:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 3:53 [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit Andrew Cagney
2003-02-20 13:45 ` Andrew Cagney
2003-02-20 20:11 Zaretskii Eli
2003-02-20 13:05 ` Andrew Cagney
2003-02-22 23:28 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox