From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Mark Kettenis Cc: eliz@is.elta.co.il, gdb-patches@sources.redhat.com Subject: Re: [PATCH] Cleanup i386-tdep.c Date: Mon, 19 Feb 2001 10:47:00 -0000 Message-id: <3A9169B2.67DAF900@cygnus.com> References: <200102181017.f1IAHmd11648@delius.kettenis.local> X-SW-Source: 2001-02/msg00364.html Mark Kettenis wrote: > > Date: Sun, 18 Feb 2001 08:20:40 +0200 (IST) > From: Eli Zaretskii > > 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