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