[PATCH] Cleanup i386-tdep.c

Mark Kettenis kettenis@wins.uva.nl
Mon Feb 19 14:03:00 GMT 2001


   Date: Mon, 19 Feb 2001 13:45:06 -0500
   From: Andrew Cagney <ac131313@cygnus.com>

   Mark Kettenis wrote:
   > 
   >    Date: Sun, 18 Feb 2001 08:20:40 +0200 (IST)
   >    From: Eli Zaretskii <eliz@is.elta.co.il>
   > 
   >    On Sat, 17 Feb 2001, Mark Kettenis wrote:
   > 
   >    > The attached patch cleans up i386-tdep.c such that it follows the GNU
   >    > coding standards more closely, and removes redundant prototypes.
   > 
   >    Which reminds me: where is the right place to put the x86 watchpoints
   >    stuff I'm working on?  Is i386-tdep.c a good one?  i386-nat.c doesn't
   >    seem to exist...
   > 
   > Please create i386-nat.c (and i386-nat.h, for the exported
   > interfaces).  i386-tdep.c isn't the right place since a cross-debugger
   > won't need the code.  It's the remote-end that's responsible for
   > implementing hardware breakpoints.

   Maybe, maybe not.  There are two ways of implementing hardware
   watchpoints - on the target side and on the host side.  Both are
   correct.

   With target side watchpoints, GDB knows nothing of what is going on -
   the target would shoot across a Z packet or perform a ptrace() call. 
   With host side watchpoints, the target has access to the hardware
   watchpoint registers and can ask a (GDB) i386 utility routine to blat
   them accordingly.

Ah, but, unless I'm missing something, there's absolutely no support
for "host side watchpoints" and "target access to the hardware
watchpoint registers" for i386 targets in the current sources.  I'd
still like to have the stuff Eli is hacking on in i386-nat.c.  We can
always move that stuff into i386-tdep.c if someone ever feels the need
to implement host size watchpoints for an i386 target.

Mark



More information about the Gdb-patches mailing list