along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdio.h>
#include "defs.h"
-#include "param.h"
#include "frame.h"
#include "inferior.h"
#include "language.h"
#include <sys/reg.h>
#include "ieee-float.h"
-extern void print_387_control_word (); /* i387-tdep.h */
-extern void print_387_status_word ();
+#include "target.h"
extern struct ext_format ext_format_i387;
\f
-/* this table must line up with REGISTER_NAMES in m-i386.h */
+/* this table must line up with REGISTER_NAMES in tm-i386v.h */
/* symbols like 'EAX' come from <sys/reg.h> */
static int regmap[] =
{
/* blockend is the value of u.u_ar0, and points to the
* place where GS is stored
*/
+
+int
i386_register_u_addr (blockend, regnum)
+ int blockend;
+ int regnum;
{
#if 0
/* this will be needed if fp registers are reinstated */
}
+#if 0
+/* mauro@olympus 1991.10.20 -- compiling the following code causes
+ undefined symbols at link time, specifically: corechan, have_inferior_p */
struct env387
{
unsigned short control;
printf (" %g\n", val);
}
if (ep->r0)
- printf ("warning: reserved0 is %s\n", local_hex_string(ep->r0));
+ warning ("reserved0 is %s\n", local_hex_string(ep->r0));
if (ep->r1)
- printf ("warning: reserved1 is %s\n", local_hex_string(ep->r1));
+ warning ("reserved1 is %s\n", local_hex_string(ep->r1));
if (ep->r2)
- printf ("warning: reserved2 is %s\n", local_hex_string(ep->r2));
+ warning ("reserved2 is %s\n", local_hex_string(ep->r2));
if (ep->r3)
- printf ("warning: reserved3 is %s\n", local_hex_string(ep->r3));
+ warning ("reserved3 is %s\n", local_hex_string(ep->r3));
}
#ifndef U_FPSTATE
struct fpstate *fpstatep;
char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
unsigned int uaddr;
- char fpvalid;
+ char fpvalid = 0;
unsigned int rounded_addr;
unsigned int rounded_size;
extern int corechan;
int skip;
uaddr = (char *)&u.u_fpvalid - (char *)&u;
- if (have_inferior_p())
+ if (target_has_execution)
{
unsigned int data;
unsigned int mask;
rounded_addr = uaddr & -sizeof (int);
- data = ptrace (3, inferior_pid, rounded_addr, 0);
+ 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 ("read on core file");
}
+#endif /* no core support yet */
if (fpvalid == 0)
{
}
uaddr = (char *)&U_FPSTATE(u) - (char *)&u;
- if (have_inferior_p ())
+ if (target_has_execution)
{
int *ip;
ip = (int *)buf;
for (i = 0; i < rounded_size; i++)
{
- *ip++ = ptrace (3, inferior_pid, rounded_addr, 0);
+ *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 ("read from core file");
skip = 0;
}
-
+ #endif /* 0 */
+
fpstatep = (struct fpstate *)(buf + skip);
print_387_status (fpstatep->status, (struct env387 *)fpstatep->state);
}
+#endif /* mauro@olympus 1991.10.20 */