This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Getting the i386 watchpoints into the taget vector?
- From: Andrew Cagney <ac131313 at ges dot redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 19 Sep 2002 21:57:40 -0400
- Subject: Getting the i386 watchpoints into the taget vector?
Hello,
With the watchpoint interface made part of the target vector, its time
to think about how the i386 case should be handled. Instead of using a
system interface, the i386 manipulates the hardware watchpoint registers
directly. For want of a better name, I'll call this ``native watchpoints''.
One thought is to change the config/i386/nm-i386.h macros to something
native specific (native_insert_watchpoint()) and then have the various
native targets (infptrace.c, ...) add these methods to their target vector.
It does restrict things to native targets. A remote target couldn't
make use of GDB's built-in knowledge of watchpoint registers.
Another (less well thought out) idea, is for the target stack, to fall
back to the ``native watchpoint'' mechanism when the [remote] target
doesn't support watchpoints. I think this would mean putting the
``native watchpoint'' methods in the architecture vector where the
target vector code could call it.
Thoughts? Better ideas?
Andrew