This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, bauerman at br dot ibm dot com, uweigand at de dot ibm dot com
- Date: Tue, 03 May 2011 21:02:39 +0300
- Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint
- References: <201104291726.p3THQVaC029608@d06av02.portsmouth.uk.ibm.com> <201105031058.44489.pedro@codesourcery.com> <83iptr4tba.fsf@gnu.org> <201105031841.46949.pedro@codesourcery.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.