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: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org, Eli Zaretskii <eliz at gnu dot org>
- Cc: bauerman at br dot ibm dot com, uweigand at de dot ibm dot com
- Date: Tue, 3 May 2011 19:12:42 +0100
- Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint
- References: <201104291726.p3THQVaC029608@d06av02.portsmouth.uk.ibm.com> <201105031841.46949.pedro@codesourcery.com> <83hb9b4q80.fsf@gnu.org>
On Tuesday 03 May 2011 19:02:39, Eli Zaretskii wrote:
> > 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.
Right, I meant the accounting instructure on the core side. For
x86, i386-nat.c would stay as is. The merging is done at insert
time currently, and it would stay the same. The difference would
be that gdb would insert the watchpoint as soon as the user wanted
it, instead of calling some "may I create this?" mechanism.
> 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.
I'm proposing getting rid of target_can_use_hardware_watchpoint
as being part of the core accounting infrastructure.
I'm trying to think of a use case that makes it necessary to know
if the watchpoints will fit before creating them, but I'm not
coming up with any.
--
Pedro Alves