Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Patch to implement set remote hardware-watchpoint-length-limit
@ 2011-03-20 21:18 Philippe Waroquiers
  0 siblings, 0 replies; only message in thread
From: Philippe Waroquiers @ 2011-03-20 21:18 UTC (permalink / raw)
  To: gdb

[-- 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.
> 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-20 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20 21:18 Patch to implement set remote hardware-watchpoint-length-limit Philippe Waroquiers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox