From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14048 invoked by alias); 10 Jan 2002 19:56:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14007 invoked from network); 10 Jan 2002 19:56:05 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 10 Jan 2002 19:56:05 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16OlJl-0002jH-00; Thu, 10 Jan 2002 14:56:53 -0500 Date: Thu, 10 Jan 2002 11:56:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: Elena Zannoni , Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Export fill_fpxregset Message-ID: <20020110145653.B10383@nevyn.them.org> Mail-Followup-To: Michael Snyder , Elena Zannoni , Michael Snyder , gdb-patches@sources.redhat.com References: <200201092228.g09MSGl03285@reddwarf.cygnus.com> <15420.53104.770587.362588@localhost.cygnus.com> <3C3DEFCE.B5A19EFC@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C3DEFCE.B5A19EFC@redhat.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00246.txt.bz2 On Thu, Jan 10, 2002 at 11:47:26AM -0800, Michael Snyder wrote: > Elena Zannoni wrote: > > > > Sorry, but does this conflict with the extern in gregset.h? > > > > extern void fill_fpxregset (gdb_fpxregset_t *fpxregs, int regno); > > > > We have gdb_fpxregset_t vs. elf_fpxregset_t. > > > > Should we just use one or the other? > > I just remembered running into a similar problem some time back. > > Hmm, well since this is (currently) only used on Linux, we COULD > just use elf_gregset_t, but I was following a precident that was > set for gregset_t and fpregset_t, to avoid potential portability > problems. > > The types "gdb_gregset_t" and "gdb_fpregset_t" were introduced > because there was no consistent definition across platforms for > gregset and fpregset. Linux uses elf_fpregset, solaris uses > prfpregset, sunos uses fpregset... > > The gregset.h header file defines a portable interface to the > rest of gdb, which therefore does not need to know what the > native types of fpregset etc. are. > > In this case, i386-linux-nat.c uses the native type elf_fpxregset_t, > while the rest of gdb will use the portable type gdb_fpxregset_t. > Since they are identical, there shouldn't be a problem. I don't think there should be a gdb_fpxregset_t. There's no such thing as a portable fpxregset; PowerPC is going to have a vrregset instead, in fact. How this should be handled in generic code that wants to manipulate regsets remains to be seen. Ideal might be a list of available regset types in a struct somewhere. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer