From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3598 invoked by alias); 20 Feb 2003 03:53:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3591 invoked from network); 20 Feb 2003 03:53:24 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 20 Feb 2003 03:53:24 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EED7D2ED1; Wed, 19 Feb 2003 22:58:07 -0500 (EST) Message-ID: <3E54524F.10809@redhat.com> Date: Thu, 20 Feb 2003 03:53:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.0.2) Gecko/20030217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Cc: sjohnson@neurizon.net Subject: [patch, rfa:doco] Add set/show remote hardware-breakpoint/watchpoint-limit Content-Type: multipart/mixed; boundary="------------010809000706050607040500" X-SW-Source: 2003-02/txt/msg00467.txt.bz2 This is a multi-part message in MIME format. --------------010809000706050607040500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 355 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 --------------010809000706050607040500 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 4381 2003-02-19 Andrew Cagney * 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 * 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 --------------010809000706050607040500--