From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8292 invoked by alias); 20 Nov 2001 17:50:30 -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 8250 invoked from network); 20 Nov 2001 17:50:26 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sourceware.cygnus.com with SMTP; 20 Nov 2001 17:50:26 -0000 Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id JAA26742; Tue, 20 Nov 2001 09:40:30 -0800 (PST) Received: (from kev@localhost) by cse.cygnus.com (8.9.3/8.9.3) id KAA18928; Tue, 20 Nov 2001 10:40:21 -0700 Date: Fri, 09 Nov 2001 02:05:00 -0000 From: Kevin Buettner Message-Id: <1011120174021.ZM18927@ocotillo.lan> In-Reply-To: Elena Zannoni "What's the correct type for {supply,fill}_fpregset?" (Nov 20, 11:50am) References: <15354.35304.932930.264859@krustylu.cygnus.com> X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: Elena Zannoni , gdb@sources.redhat.com Subject: Re: What's the correct type for {supply,fill}_fpregset? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2001-11/txt/msg00097.txt.bz2 On Nov 20, 11:50am, Elena Zannoni wrote: > Is the type of {supply,fill}_fpregset's argument wrong? It matches > what in gregset.h, but few other *-linux-nat.c declare those functions > the same way ppc-linux-nat.c does. > > The defintions in use are from ppc-linux-nat.c: > void fill_fpregset (gdb_fpregset_t *fpregsetp, int regno) > void supply_fpregset (gdb_fpregset_t * fpregsetp) > > Or should the calls in thread-db.c be changed? This has frequently been a source of annoyance for me and I had never really taken a close look to see how things ought to be done... It seems to me that reason for {supply,fill}_[fp,g}regset()'s existence is to 1) communicate with /proc on Solaris, Unixware, and AIX5 systems and 2) to communicate with the thread library. For the floating point registers, the type used to communicate with this underlying OS support is prfpregset_t. Since there's some variablility in how this is defined, we (quite sensibly) define gdb_prfpregset_t, but we don't use it everywhere that we should. In my opinion, it is this type that ought to be used in the definition of fill_fpregset() and supply_fpregset(). (And not just for Linux/PPC, but everywhere else too.) The other way to approach this is to define gdb_fpregset_t in terms of prfpregset_t and to use gdb_fpregset_t everywhere. (It accomplishes the same thing, but with a different name.) Kevin