This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Hardware watchpoints; dealing with false triggers?
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 04 Dec 2001 12:08:31 +0100
- Subject: Re: Hardware watchpoints; dealing with false triggers?
- Organization: Axis Communications AB
- References: <Pine.SUN.3.91.1011129164553.14665E-100000@is> <3C07B6FE.BBFA048D@axis.com> <5137-Fri30Nov2001203301+0200-eliz@is.elta.co.il>
Eli Zaretskii wrote:
>
> > Date: Fri, 30 Nov 2001 17:42:38 +0100
> > From: Orjan Friberg <orjan.friberg@axis.com>
> >
> > Ok, but say that the actual address is shipped with the register packet
> > when the target stops so that gdb in fact knows what address was
> > actually read/written. I'm thinking gdb could compare that address with
> > the watchpoints, and just send the target on its way if the address is
> > outside the watched ranges.
>
> This can be done. The low-level target end is repsonsible to tell
> GDB whether a watchpoint triggered, and at what address. So given
> enough information from your target, you could write the low-level
> watchpoint code to DTRT.
Ah, great.
> > And this is the key issue: could the interface to the target-specific
> > code be extended to handle the concept of "actual watchpoint address"?
>
> We already have this: it's called target_stopped_data_address.
> breakpoint.c uses this macro to see which watchpoint, if any,
> triggered.
Also great. Thank you very much for your comments on this, Eli.
--
Orjan Friberg
Axis Communications AB