[RFA 2/3] Demote to sw watchpoint only in update_watchpoint

Eli Zaretskii eliz@gnu.org
Tue May 3 18:03:00 GMT 2011


> From: Pedro Alves <pedro@codesourcery.com>
> Date: Tue, 3 May 2011 18:41:46 +0100
> Cc: gdb-patches@sourceware.org,
>  bauerman@br.ibm.com,
>  uweigand@de.ibm.com
> 
> > Or we could let targets which needs that (e.g., those using jtag as
> > you described) try inserting the watchpoints to respond to GDB's
> > request in target_can_use_hardware_watchpoint.  Other targets, which
> > can decide that without inserting, would not need to do that.
> > 
> > WDYT?
> 
> The main point/win of the suggestion was avoiding the whole
> resource accounting infrastructure, getting away without adding
> a bunch of (what looks to me at this point, unnecessary) target
> methods/packets/logic.

At least for x86, the resource accounting is necessary, because that
is what allows us to have several watchpoints sharing the same debug
register.  Targets that already have this resource accounting may well
use it to return accurate results to target_can_use_hardware_watchpoint
without actually going to the metal or the kernel.



More information about the Gdb-patches mailing list