This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: adjust watchpoint testing
Nathan,
I see your code have such two lines:
+ if [target_info exists gdb,hardware_watchpoints] {
+ set nwatch [target_info gdb,hardware_watchpoints]
Where is this target_info variable set up? Did you set that somewhere in
the dejagnu package? I am very curious about how it is implemented.
I am now using a test and trial method. If rwatch command reports that
this type of hw watchpoint is not supported, then I will assume this
target don't support hardware watchpoint; if it replys with a message
"Hardware read watchpoint...", then I assume it is supported. But I
don't figure out how to get precisely how many hw watchpoints the
target support? How did you make that? Can you share your idea with
me? Thanks a lot!
Regards
- Wu Zhou
On Mon, 12 Jun 2006, Nathan Sidwell wrote:
> Wu Zhou wrote:
> > Nathan,
> >
> > I had similar concerns about these watchpoint tests with you. However, I'd
> > like to propose a somewhat different solution.
>
> > This target-dependent feature might incur confusion some where. One may
> > have difficulty in knowing for sure what this case is trying to test: s/w
> > watchpoint, or h/w watchpoint, or both? If there are errors reported, what
> > type of watchpoint trigger that? To track into the root cause, which code
> > to look at?
> > To clarify the situation, I propose to let recurse.exp based on totally on
> > software simulated watchpoint. This can be done easily, by using "set
> > can-use-hardware-watchpoint 0".
>
> Thanks for your comments. Over the weekend, I had a thought that the problem
> is the remote stub not telling gdb how many watchpoints it can support. I
> think this is a thing for qPacketInfo to deal with, and I can talk to Dan
> about that.
>
> nathan
> --
> Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
> nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
>
>