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)


> The current boundary is the places where breakpoint.c calls the
> various target_* methods which return information that only the target
> knows.

Right - my point is that the design itself is unclear. Your example
of the x86 watchpoint support is one of the examples where this is
particularly weird in terms of user interface, and where the implementation
implements a form of support that is different from what I *thought*
the spirit of watchpoint support in GDB was. I thought that the design
would be that GDB would ask the target if they still have enough
resources to add an extra hardware watchpoint, and automatically
downgrade to a software watchpoint if not. On x86, my guess when
I read the code, is that it won't even allow the user to continue
the debugging until some watchpoints are removed.

> One unpleasant side effect is that we only
> announce at "continue" time that too many hardware resources were
> required; we should have announced that at "watchpoint" time.

Fully agreed.

> In particular, I think that the bookkeeping of the various locations
> where watchpoints are inserted should be left to the target.  That
> would allow, e.g., targets that don't support range watchpoints to
> emulate them with multiple watchpoints.

I agree as well.

-- 
Joel


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