From: Andrew Cagney <ac131313@redhat.com>
To: gdb-patches@sources.redhat.com
Cc: sjohnson@neurizon.net
Subject: [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit
Date: Thu, 20 Feb 2003 03:53:00 -0000 [thread overview]
Message-ID: <3E54524F.10809@redhat.com> (raw)
[-- 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
next reply other threads:[~2003-02-20 3:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 3:53 Andrew Cagney [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E54524F.10809@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=sjohnson@neurizon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox