This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Cleanup: Remove dead FILL_FPXREGSET code


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.



	* 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/ 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);
-/* GNU/Linux i386: Copy register values between GDB's internal register cache
-   and the i386 extended floating point registers.  */
-#define GDB_FPXREGSET_T elf_fpxregset_t
-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);
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 
-/* Fill GDB's register array with the floating-point and SSE register
-   values in *FPXREGSETP.  */
-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.  */
-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/
RCS file: /cvs/src/src/gdb/config/i386/,v
retrieving revision 1.23
diff -u -p -r1.23
--- gdb/config/i386/	28 May 2010 18:50:31 -0000	1.23
+++ gdb/config/i386/	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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]