From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21777 invoked by alias); 20 Mar 2011 21:18:23 -0000 Received: (qmail 21767 invoked by uid 22791); 20 Mar 2011 21:18:22 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mailrelay002.isp.belgacom.be (HELO mailrelay002.isp.belgacom.be) (195.238.6.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Mar 2011 21:18:15 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYLAKsLhk1tgHYE/2dsb2JhbACDCocKjl6MeniIRrY6DYVWBA Received: from 4.118-128-109.adsl-dyn.isp.belgacom.be (HELO soleil) ([109.128.118.4]) by relay.skynet.be with SMTP; 20 Mar 2011 22:18:12 +0100 Message-ID: <44E4857B0EA34FABA6737A3B542E476D@soleil> From: "Philippe Waroquiers" To: Subject: Patch to implement set remote hardware-watchpoint-length-limit Date: Sun, 20 Mar 2011 21:18:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000D_01CBE74C.B66DC8D0" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00107.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_000D_01CBE74C.B66DC8D0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Content-length: 232 This patch allows to set the limit of the length of hardware watchpoints. This allows a.o. unlimited "simulated hardware" watchpoints with a gdbserver embedded in Valgrind. See http://bugs.kde.org/show_bug.cgi?id=214909 Philippe ------=_NextPart_000_000D_01CBE74C.B66DC8D0 Content-Type: text/plain; format=flowed; name="gdb-watchpoints-limit-length.txt"; reply-type=original Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gdb-watchpoints-limit-length.txt" Content-length: 2018 Index: gdb/remote.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.441 diff -r1.441 remote.c 7739a7740 > int remote_hw_watchpoint_length_limit =3D -1; 7742a7744,7756 > remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) > { > if (remote_hw_watchpoint_length_limit =3D=3D 0) > return 0; > else if (remote_hw_watchpoint_length_limit < 0) > return 1; > else if (len <=3D remote_hw_watchpoint_length_limit) > return 1; > else > return 0; > } >=20 > static int 10269a10284,10285 > remote_ops.to_region_ok_for_hw_watchpoint > =3D remote_region_ok_for_hw_watchpoint; 10675a10692,10698 > add_setshow_zinteger_cmd ("hardware-watchpoint-length-limit", no_class, > &remote_hw_watchpoint_length_limit, _("\ > Set the maximum length of a target hardware watchpoint."), _("\ > Show the maximum length of a target hardware watchpoint."), _("\ > Specify a negative limit for unlimited."), > NULL, NULL, /* FIXME: i18n: The maximum length of a target hardwar= e watchpoint is %s. */ > &remote_set_cmdlist, &remote_show_cmdlist); Index: gdb/doc/gdb.texinfo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.814 diff -r1.814 gdb.texinfo 16502a16503,16510 > @cindex limit hardware watchpoints length > @cindex remote target, limit watchpoints length > @anchor{set remote hardware-watchpoint-length-limit} > @item set remote hardware-watchpoint-length-limit @var{limit} > Restrict @value{GDBN} to using @var{limit} for the maximum length of > remote hardware watchpoints. A limit of -1, the default, is treated > as unlimited. >=20 ------=_NextPart_000_000D_01CBE74C.B66DC8D0--