This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Adding watchpoint functions to target vector vs. TARGET*WATCHPOINT macros
- From: Daniel Jacobowitz <drow at false dot org>
- To: David Daney <ddaney at avtrex dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 9 Sep 2008 08:16:38 -0400
- Subject: Re: Adding watchpoint functions to target vector vs. TARGET*WATCHPOINT macros
- References: <48C60739.8070000@avtrex.com>
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
CodeSourcery