aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386gnu-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/i386gnu-nat.c')
-rw-r--r--gdb/i386gnu-nat.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 023fbb7..f694eba 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -28,7 +28,6 @@
#include "gdb_assert.h"
#include <errno.h>
#include <stdio.h>
-#include "gdb_string.h"
#include <mach.h>
#include <mach_error.h>
@@ -61,9 +60,8 @@ 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)
{
@@ -81,15 +79,18 @@ fetch_fpregs (struct proc *thread)
}
if (!state.initialized)
+ /* The floating-point state isn't initialized. */
{
- /* 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);
+ int i;
+
+ for (i = FP0_REGNUM; i <= FOP_REGNUM; i++)
+ regcache_raw_supply (current_regcache, i, NULL);
+
+ return;
}
+
+ /* Supply the floating-point registers. */
+ i387_supply_fsave (current_regcache, -1, state.hw_state);
}
#ifdef HAVE_SYS_PROCFS_H