This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]