From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29512 invoked by alias); 30 Oct 2007 21:02:56 -0000 Received: (qmail 29485 invoked by uid 22791); 30 Oct 2007 21:02:52 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 30 Oct 2007 21:02:50 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id l9UL2kC1337752 for ; Tue, 30 Oct 2007 21:02:46 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9UL2kec2207888 for ; Tue, 30 Oct 2007 22:02:46 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l9UL2kIk024431 for ; Tue, 30 Oct 2007 22:02:46 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l9UL2kmf024428; Tue, 30 Oct 2007 22:02:46 +0100 Message-Id: <200710302102.l9UL2kmf024428@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 30 Oct 2007 22:02:46 +0100 Subject: Re: [RFC] Add support for PPC Altivec registers in gcore To: cseo@linux.vnet.ibm.com (Carlos Eduardo Seo) Date: Tue, 30 Oct 2007 21:18:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches Mailing List) In-Reply-To: <472798F0.8050303@linux.vnet.ibm.com> from "Carlos Eduardo Seo" at Oct 30, 2007 06:49:52 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00830.txt.bz2 Carlos Eduardo Seo wrote: > About the new gdbarch variable, do you think it's a good idea to > introduce it now, only with .reg-ppc-vmx and .reg-xfp on the list, or > you'd rather do a full rework later in GDB in order to remove all > fill_ fallbacks make linux-nat/corelow code get everything from there? Completely removing all the fallbacks seems quite a bit of work; if you want to work on it that would certainly be welcome. However, I think it would be OK to start with having the gdbarch variable only contain the *extra* register sets, beyond the core and floating-point sets. > + if (core_regset_p > + && (regset = gdbarch_regset_from_core_section (gdbarch, ".reg-ppc-vmx", > + sizeof (vrregs))) != NULL > + && regset->collect_regset != NULL) > + regset->collect_regset (regset, regcache, -1, > + &vrregs, sizeof (vrregs)); > + > + note_data = (char *) elfcore_write_ppc_vmx (obfd, > + note_data, > + note_size, > + &vrregs, sizeof (vrregs)); If we do not have a collect_regset, we certainly do not want to write an note section containing uninitialized data. The elfcore_write_ppc_vmx call needs to be inside the "if" block ... > -static void > +void > fill_vrregset (const struct regcache *regcache, gdb_vrregset_t *vrregsetp) This is no longer necessary now. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com