This is the mail archive of the gdb-patches@sources.redhat.com 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] Make GNU/Hurd native build again


I somehow managed to break this...

Hopefully it works now.  I'll find out soon, but running under Bochs,
the Hurd isn't exactly a speed monster.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386gnu-nat.c: Include "gdb_string.h".
	(fetch_fpregs): Use i387_supply_fxsave to fill the floating-point
	registers when the floating-point state isn't initialized.
	* Makefile.in (i386gnu-nat.o): Update dependencies.

Index: i386gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386gnu-nat.c,v
retrieving revision 1.22
diff -u -p -r1.22 i386gnu-nat.c
--- i386gnu-nat.c 8 Aug 2004 15:27:56 -0000 1.22
+++ i386gnu-nat.c 11 Oct 2004 19:58:52 -0000
@@ -28,6 +28,7 @@
 #include "gdb_assert.h"
 #include <errno.h>
 #include <stdio.h>
+#include "gdb_string.h"
 
 #include <mach.h>
 #include <mach_error.h>
@@ -60,8 +61,9 @@ static int reg_offset[] =
 #define REG_ADDR(state, regnum) ((char *)(state) + reg_offset[regnum])
 
 
-/* Get the whole floating-point state of THREAD and record the
-   values of the corresponding (pseudo) registers.  */
+/* Get the whole floating-point state of THREAD and record the values
+   of the corresponding (pseudo) registers.  */
+
 static void
 fetch_fpregs (struct proc *thread)
 {
@@ -79,18 +81,15 @@ fetch_fpregs (struct proc *thread)
     }
 
   if (!state.initialized)
-    /* The floating-point state isn't initialized.  */
     {
-      int i;
-
-      for (i = FP0_REGNUM; i <= FOP_REGNUM; i++)
-	regcache_raw_supply (current_regcache, i, NULL);
-
-      return;
+      /* The floating-point state isn't initialized.  */
+      i387_supply_fsave (current_regcache, -1, NULL);
+    }
+  else
+    {
+      /* Supply the floating-point registers.  */
+      i387_supply_fsave (current_regcache, -1, state.hw_state);
     }
-
-  /* Supply the floating-point registers.  */
-  i387_supply_fsave (current_regcache, -1, state.hw_state);
 }
 
 #ifdef HAVE_SYS_PROCFS_H
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.639
diff -u -p -r1.639 Makefile.in
--- Makefile.in 10 Oct 2004 19:50:59 -0000 1.639
+++ Makefile.in 11 Oct 2004 19:58:55 -0000
@@ -2004,8 +2004,8 @@ i386fbsd-nat.o: i386fbsd-nat.c $(defs_h)
 i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
 	$(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
 i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
-	$(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \
-	$(i387_tdep_h) $(gregset_h)
+	$(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) \
+	$(gnu_nat_h) $(i387_tdep_h) $(gregset_h)
 i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h)
 i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
 	$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \


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