From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16235 invoked by alias); 11 Jun 2010 12:17:36 -0000 Received: (qmail 16225 invoked by uid 22791); 11 Jun 2010 12:17:33 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,TW_EG,TW_FP,TW_PX,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.17.165) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Jun 2010 12:17:27 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id o5BCHOur029938 for ; Fri, 11 Jun 2010 12:17:24 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 v10.0) with ESMTP id o5BCHO781163498 for ; Fri, 11 Jun 2010 14:17:24 +0200 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 o5BCHO5J013833 for ; Fri, 11 Jun 2010 14:17:24 +0200 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 o5BCHNHu013792 for ; Fri, 11 Jun 2010 14:17:23 +0200 Message-Id: <201006111217.o5BCHNHu013792@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 11 Jun 2010 14:17:23 +0200 Subject: [commit] Cleanup: Remove dead FILL_FPXREGSET code To: gdb-patches@sourceware.org Date: Fri, 11 Jun 2010 12:17:00 -0000 From: "Ulrich Weigand" 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: 2010-06/txt/msg00258.txt.bz2 Hello, while looking at gregset handling for other reasons, I noticed that we still have a block guarded by #ifdef FILL_FPXREGSET in gregset.h. This is now dead code as the i386 target was changed to use the new gdbarch_core_regset_sections mechanism instead; linux-nat.c no longer uses any of the definitions depending on FILL_FPXREGSET. This patch cleans this up by removing the block in gregset.h and the definition of FILL_FPXREGSET in config/i386/nm-linux.h; the latter now makes the complete file superfluous. Tested on i386-linux, committed to mainline. Bye, Ulrich ChangeLog: * gregset.h (GDB_FPXREGSET_T): Remove. (gdb_fpxregset_t): Likewise. (supply_fpxregset): Remove prototype. (fill_fpxregset): Likewise. * i386-linux-nat.c (supply_fpxregset): Remove. (fill_fpxregset): Likewise. (fetch_fpxregs): Inline supply_fpxregset call. (store_fpxregs): Inline fill_fpxregset call. * config/i386/linux.mh: Set NAT_FILE to config/nm-linux.h. * config/i386/nm-linux.h: Remove file. Index: gdb/gregset.h =================================================================== RCS file: /cvs/src/src/gdb/gregset.h,v retrieving revision 1.14 diff -u -p -r1.14 gregset.h --- gdb/gregset.h 1 Jan 2010 07:31:33 -0000 1.14 +++ gdb/gregset.h 10 Jun 2010 18:01:59 -0000 @@ -57,20 +57,4 @@ extern void fill_gregset (const struct r extern void fill_fpregset (const struct regcache *regcache, gdb_fpregset_t *fpregs, int regno); -#ifdef FILL_FPXREGSET -/* GNU/Linux i386: Copy register values between GDB's internal register cache - and the i386 extended floating point registers. */ - -#ifndef GDB_FPXREGSET_T -#define GDB_FPXREGSET_T elf_fpxregset_t -#endif - -typedef GDB_FPXREGSET_T gdb_fpxregset_t; - -extern void supply_fpxregset (struct regcache *regcache, - const gdb_fpxregset_t *fpxregs); -extern void fill_fpxregset (const struct regcache *regcache, - gdb_fpxregset_t *fpxregs, int regno); -#endif - #endif Index: gdb/i386-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v retrieving revision 1.99 diff -u -p -r1.99 i386-linux-nat.c --- gdb/i386-linux-nat.c 22 Apr 2010 20:35:28 -0000 1.99 +++ gdb/i386-linux-nat.c 10 Jun 2010 18:01:59 -0000 @@ -413,27 +413,6 @@ store_xstateregs (const struct regcache #ifdef HAVE_PTRACE_GETFPXREGS -/* Fill GDB's register array with the floating-point and SSE register - values in *FPXREGSETP. */ - -void -supply_fpxregset (struct regcache *regcache, - const elf_fpxregset_t *fpxregsetp) -{ - i387_supply_fxsave (regcache, -1, fpxregsetp); -} - -/* Fill register REGNO (if it is a floating-point or SSE register) in - *FPXREGSETP with the value in GDB's register array. If REGNO is - -1, do this for all registers. */ - -void -fill_fpxregset (const struct regcache *regcache, - elf_fpxregset_t *fpxregsetp, int regno) -{ - i387_collect_fxsave (regcache, regno, fpxregsetp); -} - /* Fetch all registers covered by the PTRACE_GETFPXREGS request from process/thread TID and store their values in GDB's register array. Return non-zero if successful, zero otherwise. */ @@ -457,7 +436,7 @@ fetch_fpxregs (struct regcache *regcache perror_with_name (_("Couldn't read floating-point and SSE registers")); } - supply_fpxregset (regcache, (const elf_fpxregset_t *) &fpxregs); + i387_supply_fxsave (regcache, -1, (const elf_fpxregset_t *) &fpxregs); return 1; } @@ -484,7 +463,7 @@ store_fpxregs (const struct regcache *re perror_with_name (_("Couldn't read floating-point and SSE registers")); } - fill_fpxregset (regcache, &fpxregs, regno); + i387_collect_fxsave (regcache, regno, &fpxregs); if (ptrace (PTRACE_SETFPXREGS, tid, 0, &fpxregs) == -1) perror_with_name (_("Couldn't write floating-point and SSE registers")); Index: gdb/config/i386/linux.mh =================================================================== RCS file: /cvs/src/src/gdb/config/i386/linux.mh,v retrieving revision 1.23 diff -u -p -r1.23 linux.mh --- gdb/config/i386/linux.mh 28 May 2010 18:50:31 -0000 1.23 +++ gdb/config/i386/linux.mh 10 Jun 2010 18:02:00 -0000 @@ -1,6 +1,6 @@ # Host: Intel 386 running GNU/Linux. -NAT_FILE= nm-linux.h +NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o \ i386-nat.o i386-linux-nat.o \ proc-service.o linux-thread-db.o \ -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com