This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] GDB patches for hw watchpoints - revised
On Tue, 6 Dec 2005, Daniel Jacobowitz wrote:
> On Tue, Dec 06, 2005 at 10:25:01PM +0200, Eli Zaretskii wrote:
> > > Date: Tue, 6 Dec 2005 14:12:26 +0800 (CST)
> > > From: Wu Zhou <woodzltc@cn.ibm.com>
> > > cc: drow@false.org, eliz@gnu.org, mark.kettenis@xs4all.nl
> > >
> > > 3. Eli ever expressed a concern that the PPC doesn't have a way to return
> > > the data address that triggered the watchpoint? As far as I think, the
> > > reason is that PPC will only have one DABR (if it does have). So maybe we
> > > don't need to have such a method.
> >
> > Sorry, I'm not following: no matter how many debug registers the PPC
> > has, it can still return to GDB the data address that triggered the
> > watchpoint. I don't think the higher levels of GDB (breakpoint.c)
> > should know or assume anything about the target capabilities or
> > resources. Let's try keeping the code clean of such peculiarities.
>
> Wu, you're using GETSIGINFO to check for a watchpoint. Then isn't the
> faulting address stored in the siginfo anyway?
Currently what stored in the siginfo.si_addr is the address of next
instruction. Anton sent me a patch to change that to the data address
instead. I am now playing with the patched kernel.
BTW. It seems that to_stopped_data_address is only used in rwatch and
awatch, which is not that frequently used as watch itself. So may we
postpone its implementation till some later time?
Regards
- Wu Zhou