From b7a8b4ef6b4203072015422e0601440f60f29adb Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 11 Jun 2010 12:08:51 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 14 ++++++++++++++ gdb/config/i386/linux.mh | 2 +- gdb/config/i386/nm-linux.h | 32 -------------------------------- gdb/gregset.h | 16 ---------------- gdb/i386-linux-nat.c | 25 ++----------------------- 5 files changed, 17 insertions(+), 72 deletions(-) delete mode 100644 gdb/config/i386/nm-linux.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dbdaa7e..9f7ac39 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +2010-06-09 Ulrich Weigand + + * 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. + 2010-06-09 Michael Snyder * target.c (update_current_target): Fix spelling error in comment. diff --git a/gdb/config/i386/linux.mh b/gdb/config/i386/linux.mh index 302f6d5..5590f57 100644 --- a/gdb/config/i386/linux.mh +++ b/gdb/config/i386/linux.mh @@ -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 \ diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h deleted file mode 100644 index 10db309..0000000 --- a/gdb/config/i386/nm-linux.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Native support for GNU/Linux x86. - - Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef NM_LINUX_H -#define NM_LINUX_H - -#include "config/nm-linux.h" - -#ifdef HAVE_PTRACE_GETFPXREGS -/* Include register set support for the SSE registers. */ -#define FILL_FPXREGSET -#endif - -#endif /* nm-linux.h */ diff --git a/gdb/gregset.h b/gdb/gregset.h index c18ee51..8008189 100644 --- a/gdb/gregset.h +++ b/gdb/gregset.h @@ -57,20 +57,4 @@ extern void fill_gregset (const struct regcache *regcache, 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 diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index eba0b6a..4fce1ac 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -413,27 +413,6 @@ store_xstateregs (const struct regcache *regcache, int tid, int regno) #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, int tid) 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 *regcache, int tid, int regno) 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")); -- 2.7.4