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: [RFC] Wrong hw_watchpoint_used_count? (multiple location watchpoints)


> But this is something only the target knows.  There's no way for
> breakpoint.c to know that, unless we introduce an API through which
> breakpoint.c can ask the target to provide that number.

That's what I eventually thought as well... I have relatively little
experience in how GDB is designed to handle watchpoints, but it seemed
that the boundary between the what the target knows and how the core
uses it provide watchpoint support is pretty hard to find... Perhaps,
one day, we'll want to clarify this area of our code.

> Please note, for example, that some watchpoints can actually need
> *zero* bp_locations, because some other watchpoint already watches the
> same address.  x86 uses reference counting to not waste hardware
> resources for the same address.

Clever!

Thanks for the feedback.

-- 
Joel


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