Re: adjust watchpoint testing

Wu Zhou
2006-06-14T01:21:59Z

On Tue, 13 Jun 2006, Eli Zaretskii wrote:

> > Date: Tue, 13 Jun 2006 14:43:13 +0800 (CST)
> > From: Wu Zhou <woodzltc@cn.ibm.com>
> > cc: gdb-patches@sourceware.org
> >
> > Do you mean to hard-wire the number of the hw watchpoint the underlying target
> > support into these base board files, or just set the number to 1?
> >
> > I guess that we might need to work out a way to detect the number
> > automatically. Any thought?
>
> I don't think there's any practical way to detect the number of
> supported watchpoints. It depends on the particulars of the watched
> regions, and different targets have different peculiarities. For
> example, x86 can set an unlimited number of watchpoints provided that
> they watch the same address and length.

What about adding a gdbarch specific member function to do this? If this
is still target dependent, we can overwrite it in the relevant tdep file.

For x86 case, maybe we can take them as only one watchpoint if they are
watching on the same address of same length?

My very initial idea though. Feel free to correct me if I am wrong.

Thanks
- Wu Zhou