This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Cleanup i386-tdep.c


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.

enjoy,
	Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]