From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26430 invoked by alias); 26 Nov 2001 20:43:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26406 invoked from network); 26 Nov 2001 20:43:25 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.147.211.196) by hostedprojects.ges.redhat.com with SMTP; 26 Nov 2001 20:43:25 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id BCEE03DBA; Mon, 26 Nov 2001 15:43:18 -0500 (EST) Message-ID: <3C02A966.30003@cygnus.com> Date: Tue, 13 Nov 2001 07:48:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: Eli Zaretskii Cc: Pierre Muller , gdb-patches@sources.redhat.com, Christopher Faylor Subject: Re: [RFA] SSE registers for cygxin target. References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00241.txt.bz2 > On Mon, 26 Nov 2001, Pierre Muller wrote: > > >> -#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */ >> +/* Use SSE registers if winnt.h contains information about them. */ >> +#ifdef HAVE_CONTEXT_EXTENDED_REGISTERS >> +#define HAVE_SSE_REGS >> +#else > > > Is it wise to have SSE registers supported based on the compile-time > test? What if the machine on which GDB runs doesn't have SSE? Don't you > need a run-time test as well? In theory? Yes, definitly. In reality? GDB has been avoiding the problem and instead has been hardwiring the configurations. Sigh. (This also looks like the PPC and SPARC problem - regcache_collect() is flushing it out ....) The theory goes something like this: o regcache is made large enough to hold all the registers (SSE in this case) o each target (remote.c, *-nat.c) all supply and/sor collect the registers they have into the regcache o on the other side, core-gdbarch register read/write are (dynamically) configured to display the registers, within the register cache Things to note: o the core and the target can disagree on which registers are available but _not_ on the layout of the regcache. o GDB is going to need to make a pretty good educated guess as to what should be displayed when it starts - there may be no target to tell the truth. This is why I've been hacking remote.c - more changes to follow. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Eli Zaretskii Cc: Pierre Muller , gdb-patches@sources.redhat.com, Christopher Faylor Subject: Re: [RFA] SSE registers for cygxin target. Date: Mon, 26 Nov 2001 12:43:00 -0000 Message-ID: <3C02A966.30003@cygnus.com> References: X-SW-Source: 2001-11/msg00456.html Message-ID: <20011126124300.1ueMZ5aVPCt2sOIQCflKZ5BFBc5_gfuXSfLEUANuaoc@z> > On Mon, 26 Nov 2001, Pierre Muller wrote: > > >> -#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */ >> +/* Use SSE registers if winnt.h contains information about them. */ >> +#ifdef HAVE_CONTEXT_EXTENDED_REGISTERS >> +#define HAVE_SSE_REGS >> +#else > > > Is it wise to have SSE registers supported based on the compile-time > test? What if the machine on which GDB runs doesn't have SSE? Don't you > need a run-time test as well? In theory? Yes, definitly. In reality? GDB has been avoiding the problem and instead has been hardwiring the configurations. Sigh. (This also looks like the PPC and SPARC problem - regcache_collect() is flushing it out ....) The theory goes something like this: o regcache is made large enough to hold all the registers (SSE in this case) o each target (remote.c, *-nat.c) all supply and/sor collect the registers they have into the regcache o on the other side, core-gdbarch register read/write are (dynamically) configured to display the registers, within the register cache Things to note: o the core and the target can disagree on which registers are available but _not_ on the layout of the regcache. o GDB is going to need to make a pretty good educated guess as to what should be displayed when it starts - there may be no target to tell the truth. This is why I've been hacking remote.c - more changes to follow. Andrew