summaryrefslogtreecommitdiff
path: root/gdb/i386v-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/i386v-nat.c')
-rw-r--r--gdb/i386v-nat.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index e160385cccf..0bf702c368c 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -307,88 +307,3 @@ i386_stopped_by_watchpoint (pid)
}
#endif /* TARGET_HAS_HARDWARE_WATCHPOINTS */
-
-#if 0
-/* using FLOAT_INFO as is would be a problem. FLOAT_INFO is called
- via a command xxx and eventually calls ptrace without ever having
- traversed the target vector. This would be terribly impolite
- behaviour for a sun4 hosted remote gdb.
-
- A fix might be to move this code into the "info registers" command.
- rich@cygnus.com 15 Sept 92. */
-i386_float_info ()
-{
- struct user u; /* just for address computations */
- int i;
- /* fpstate defined in <sys/user.h> */
- struct fpstate *fpstatep;
- char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
- unsigned int uaddr;
- char fpvalid = 0;
- unsigned int rounded_addr;
- unsigned int rounded_size;
- extern int corechan;
- int skip;
-
- uaddr = (char *) &u.u_fpvalid - (char *) &u;
- if (target_has_execution)
- {
- unsigned int data;
- unsigned int mask;
-
- rounded_addr = uaddr & -sizeof (int);
- data = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) rounded_addr, 0);
- mask = 0xff << ((uaddr - rounded_addr) * 8);
-
- fpvalid = ((data & mask) != 0);
- }
-#if 0
- else
- {
- if (lseek (corechan, uaddr, 0) < 0)
- perror ("seek on core file");
- if (myread (corechan, &fpvalid, 1) < 0)
- perror ("read on core file");
-
- }
-#endif /* no core support yet */
-
- if (fpvalid == 0)
- {
- printf_unfiltered ("no floating point status saved\n");
- return;
- }
-
- uaddr = (char *) &U_FPSTATE (u) - (char *) &u;
- if (target_has_execution)
- {
- int *ip;
-
- rounded_addr = uaddr & -sizeof (int);
- rounded_size = (((uaddr + sizeof (struct fpstate)) - uaddr) +
- sizeof (int) - 1) / sizeof (int);
- skip = uaddr - rounded_addr;
-
- ip = (int *) buf;
- for (i = 0; i < rounded_size; i++)
- {
- *ip++ = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) rounded_addr, 0);
- rounded_addr += sizeof (int);
- }
- }
-#if 0
- else
- {
- if (lseek (corechan, uaddr, 0) < 0)
- perror_with_name ("seek on core file");
- if (myread (corechan, buf, sizeof (struct fpstate)) < 0)
- perror_with_name ("read from core file");
- skip = 0;
- }
-#endif /* 0 */
-
- fpstatep = (struct fpstate *) (buf + skip);
- print_387_status (fpstatep->status, (struct env387 *) fpstatep->state);
-}
-
-#endif /* never */