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)


> Date: Fri, 8 Jan 2010 17:08:58 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
> 
> > That _is_ the design.  However, GDB does not tell enough to the target
> > for the target to give an accurate answer.  And what's more, some
> > questions cannot be answered without actually trying to call ptrace or
> > its equivalents, and getting its ``opinion''.  Unless we mirror all
> > the necessary information on the target level that is (which is what
> > x86 does).
> 
> Hmmm, so you're saying that the situation on x86 is because we cannot
> know in advance how many watchpoints the CPU provides?

On x86 we do know.  On other architectures we might not be able to
know.  But even on x86, breakpoint.c does not pass enough information
to the target for the latter to know if the requested watchpoints will
be successfully inserted.  For that, GDB would need to provide the
address of each watchpoint, its type (read/write), and the length of
the watched area.  It currently does not provide that.


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