This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [ feature request ] : software watchpoints, search byte pattern
- From: "Eli Zaretskii" <eliz at elta dot co dot il>
- To: sick_soul at yahoo dot it
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 28 May 2003 18:31:22 +0300
- Subject: Re: [ feature request ] : software watchpoints, search byte pattern
- References: <20030528045321.87485.qmail@web40412.mail.yahoo.com>
- Reply-to: Eli Zaretskii <eliz at elta dot co dot il>
> Date: Wed, 28 May 2003 06:53:21 +0200 (CEST)
> From: =?iso-8859-1?q?Claudio=20Fontana?= <sick_soul@yahoo.it>
>
> Hello,
> do you think these features can be added in the
> following versions?
>
> - software watchpoints: rwatch and awatch which, if
> hardware breakpoints are not available, revert to
> software ones
To implement software watchpoints, GDB single-steps the program being
debugged, and checks after each instruction whether the data being
watched has changed its value. It is impossible to implement read
watchpoints this way, since there's no way to know whether the last
instruction accessed the data being watched: reading the data doesn't
change its value.
For that reason, rwatch and awatch are only available if
hardware-assisted watchpoints are available.