This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: minor fix for i386v-nat.c
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: minor fix for i386v-nat.c
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 28 Jun 2001 13:43:15 +0300 (IDT)
- cc: John Hughes <john at Calva dot COM>, gdb-patches at sourceware dot cygnus dot com
On Thu, 28 Jun 2001, Andrew Cagney wrote:
> Did anyone ever look at this?
Is any x86 port still using this code? I'd expect them all to switch
to the new watchpoint support in i386-nat.c, by now.
> > In i386_insert_aligned_watchpoint the actual address being watched
> > was saved in address_loookup. This is fine for aligned
> > watchpoints, the address gdb wants to watch is the same as the
> > actual address. For non-aligned watchpoints we have to ask the
> > hadware to watch up to 3 different addresses. We need to remember
> > the address gdb wants to watch so i386_remove_watchpoint knows
> > which registers to clean up.
Won't this do the wrong thing in i386_stopped_by_watchpoint? You'll
report the wrong address there (not the one the debug register
actually watched).
I think a cleaner way to do this is to store the actual address being
watched by the DRi, but to modify i386_remove_watchpoint to break up
its act into several individual removals like
i386_insert_aligned_watchpoint does. This is what the code in
i386-nat.c does.