Adding watchpoint functions to target vector vs. TARGET*WATCHPOINT macros

Daniel Jacobowitz
Tue Sep 9 12:17:00 GMT 2008

On Mon, Sep 08, 2008 at 10:18:49PM -0700, David Daney wrote:
> Daniel pointed out that all the watch related functions could be added
> directly to the target vector instead of writing target specific
> TARGET*WATCHPOINT macros.  While this is true, there is a small drawback.
> The target vector is not installed until the inferior is started, so any
> watches added before this happens end up being soft-watches.

While this is true, it is a general limitation of GDB and is much less
of a problem than the ones associated with the macros; please use the
target vector.

> Ideally in when the first resume() is issued to the inferior the
> watchpoints would be re-evaluated to see if some (or all) of them could
> be converted to hardware watchpoints.  There might have to be an
> additional target hook to allow for this.

Right now there's never conversion from software to hardware
watchpoints.  But I think this would be reasonable to do.

Daniel Jacobowitz

More information about the Gdb mailing list