This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: hw watchpoint/breakpoint support for xscale
- From: Michael Snyder <msnyder at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Thu, 21 Feb 2002 12:01:24 -0800
- Subject: Re: hw watchpoint/breakpoint support for xscale
- Organization: Red Hat, Inc.
- References: <200202191609.g1JG9OS26937.cygnus.local.gdb@deneb.localdomain> <o5pu31ny0p.fsf@tooth.toronto.redhat.com> <200202192107.g1JL7N127768@deneb.localdomain> <npr8nesiyn.fsf@zwingli.cygnus.com>
Jim Blandy wrote:
>
> Mark Salter <msalter@redhat.com> writes:
> > > - request a protocol extension (some query packet)
> >
> > I think this is best. Query the board to find out how many hw
> > wathcpoints and hw breakpoints are supported. If the board
> > can't answer the query, then it doesn't support any.
>
> Be careful! The number of watchpoints can depend on their addresses
> and sizes. For example, to set a watchpoint on a two-byte object at
> an odd address, the i386 code will set *two* hardware watchpoints ---
> one for each byte --- since the i386's watchpoints are always aligned
> on a multiple of their size.
I don't think the "number of watchpoints" macro has ever
been implemented correctly on most targets. Frequently
it evaluates to "1" or "0" (this is just from my
random access memory).