From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29884 invoked by alias); 17 Nov 2001 22:50:54 -0000 Mailing-List: contact gdb-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29849 invoked from network); 17 Nov 2001 22:50:49 -0000 Received: from unknown (HELO factorix.sdv.fr) (194.206.196.2) by sourceware.cygnus.com with SMTP; 17 Nov 2001 22:50:49 -0000 Received: from ordimaison (ip-76-210.evc.net [212.95.76.210]) by factorix.sdv.fr (8.11.4/8.11.4) with SMTP id fAHMKem23969; Sat, 17 Nov 2001 23:20:40 +0100 Message-Id: <3.0.6.32.20011117235959.008c4590@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Wed, 07 Nov 2001 18:38:00 -0000 To: Christopher Faylor , gdb@sources.redhat.com From: muller@cerbere.u-strasbg.fr Subject: Re: x86 hardware breakpoint question In-Reply-To: <20011117011031.GC19468@redhat.com> References: <200111162257.fAGMv4f12497@greed.delorie.com> <20011116205455.GA18328@redhat.com> <20011115125927.B3449@atlas.lcs.mit.edu> <20011115125927.B3449@atlas.lcs.mit.edu> <4.2.0.58.20011116135651.0128d658@ics.u-strasbg.fr> <2593-Fri16Nov2001184752+0200-eliz@is.elta.co.il> <20011116205455.GA18328@redhat.com> <3.0.6.32.20011117000436.00b05380@ics.u-strasbg.fr> <200111162257.fAGMv4f12497@greed.delorie.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2001-11/txt/msg00078.txt.bz2 At 20:10 16/11/01 -0500, Christopher Faylor wrote: >On Fri, Nov 16, 2001 at 05:57:04PM -0500, DJ Delorie wrote: >> >>> So I am surprised to hear that win32 >>> lets you set debug registers, but if that works, great! >> >>I don't know if it works, I just looked it up in the documentation. >> >>> Are the debug registers process wide or >>> thread specific in that case ? >> >>Well, it is Set*Thread*Context. > >Which is, conveniently enough, what gdb is already using. :-) > >Did you find specific documentation on the hardware registers, though? > >I see this in the system header: > > BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; > >but I don't see any description about how to use them. No, these are for xmme registers of Pentium III or possibly other registers of other kind of i386 compatible regs. The debug registers are DR0-3 DR6 and DR7. DR0 to 3 are the four linear addresses watchpoints and DR6 and DR7 are used for indicating type and size of the different breakpoints. I think that DJ expects that we can directly write the values of the DR registers using SetThreadContext. This needs to be tested. ContextFlags field of context structure must contain CONTEXT_DEBUG_REGISTERS which isn't yet included into CONTEXT_DEBUG used in win32-nat code.