This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Wrong hw_watchpoint_used_count? (multiple location watchpoints)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 8 Jan 2010 14:29:55 +0400
- Subject: Re: [RFC] Wrong hw_watchpoint_used_count? (multiple location watchpoints)
- References: <20100108075701.GE4589@adacore.com> <83fx6gc43p.fsf@gnu.org>
> 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