From: "Philippe Waroquiers" <philippe.waroquiers@skynet.be>
To: <gdb@sourceware.org>
Subject: Patch to implement set remote hardware-watchpoint-length-limit
Date: Sun, 20 Mar 2011 21:18:00 -0000 [thread overview]
Message-ID: <44E4857B0EA34FABA6737A3B542E476D@soleil> (raw)
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
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
[-- Attachment #2: gdb-watchpoints-limit-length.txt --]
[-- Type: text/plain, Size: 1772 bytes --]
Index: gdb/remote.c
===================================================================
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 = -1;
7742a7744,7756
> remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
> {
> if (remote_hw_watchpoint_length_limit == 0)
> return 0;
> else if (remote_hw_watchpoint_length_limit < 0)
> return 1;
> else if (len <= remote_hw_watchpoint_length_limit)
> return 1;
> else
> return 0;
> }
>
> static int
10269a10284,10285
> remote_ops.to_region_ok_for_hw_watchpoint
> = 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 hardware watchpoint is %s. */
> &remote_set_cmdlist, &remote_show_cmdlist);
Index: gdb/doc/gdb.texinfo
===================================================================
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.
>
reply other threads:[~2011-03-20 21:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=44E4857B0EA34FABA6737A3B542E476D@soleil \
--to=philippe.waroquiers@skynet.be \
--cc=gdb@sourceware.org \
/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