Obsolete sun386i.

This commit is contained in:
Andrew Cagney 2001-04-11 22:39:07 +00:00
parent 21211521db
commit 24f89b6880
12 changed files with 536 additions and 519 deletions

View file

@ -1,3 +1,19 @@
2001-04-09 Andrew Cagney <ac131313@redhat.com>
Obsolete i[3456]86-*-sunos* (aka Sun386) host and target.
* config/i386/sun386.mh: Obsolete.
* config/i386/sun386.mt: Obsolete.
* config/i386/xm-sun386.h: Obsolete.
* config/i386/tm-sun386.h: Obsolete.
* config/i386/nm-sun386.h: Obsolete.
* Makefile.in (ALLDEPFILES): Delete sun386-nat.c.
(sun386-nat.o): Target is obsolete.
* sun386-nat.c: Obsolete.
* configure.tgt (i[3456]86-*-sunos*): Obsolete.
* configure.host (i[3456]86-*-sunos*): Obsolete.
* NEWS: Update.
* TODO: Update.
2001-04-10 J.T. Conklin <jtc@redback.com> 2001-04-10 J.T. Conklin <jtc@redback.com>
* maint.c: Fix typo in comment. * maint.c: Fix typo in comment.

View file

@ -1163,7 +1163,7 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
rs6000-nat.c rs6000-tdep.c \ rs6000-nat.c rs6000-tdep.c \
ser-go32.c ser-pipe.c ser-ocd.c ser-tcp.c \ ser-go32.c ser-pipe.c ser-ocd.c ser-tcp.c \
sh-tdep.c solib.c sparc-nat.c \ sh-tdep.c solib.c sparc-nat.c \
sparc-tdep.c sparcl-tdep.c sun3-nat.c sun386-nat.c \ sparc-tdep.c sparcl-tdep.c sun3-nat.c \
symm-tdep.c symm-nat.c \ symm-tdep.c symm-nat.c \
vax-tdep.c \ vax-tdep.c \
vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \
@ -1938,7 +1938,7 @@ ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) symfile.h $(gdbtypes_h) \
sun3-nat.o: sun3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) sun3-nat.o: sun3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
sun386-nat.o: sun386-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) # OBSOLETE sun386-nat.o: sun386-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
symfile.o: symfile.c $(breakpoint_h) complaints.h $(defs_h) \ symfile.o: symfile.c $(breakpoint_h) complaints.h $(defs_h) \
$(expression_h) gdb-stabs.h $(gdbcmd_h) $(gdbcore_h) \ $(expression_h) gdb-stabs.h $(gdbcmd_h) $(gdbcore_h) \

View file

@ -24,6 +24,7 @@ Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
PowerPC Solaris powerpcle-*-solaris* PowerPC Solaris powerpcle-*-solaris*
PowerPC Windows NT powerpcle-*-cygwin32 PowerPC Windows NT powerpcle-*-cygwin32
PowerPC Netware powerpc-*-netware* PowerPC Netware powerpc-*-netware*
SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
stuff.c (Program to stuff files into a specially prepared space in kdb) stuff.c (Program to stuff files into a specially prepared space in kdb)
kdb-start.c (Main loop for the standalone kernel debugger) kdb-start.c (Main loop for the standalone kernel debugger)

View file

@ -200,7 +200,7 @@ Steps:
powerpcle-*-cygwin* powerpc cygwin cygwin yes powerpcle-*-cygwin* powerpc cygwin cygwin yes
powerpc-*-netware* powerpc - ppc-nw yes powerpc-*-netware* powerpc - ppc-nw yes
w65-*-* w65 - w65 yes w65-*-* w65 - w65 yes
i[3456]86-*-sunos* i386 sun386 sun386 i[3456]86-*-sunos* i386 sun386 sun386 yes
(DONE) (DONE)

View file

@ -1,30 +1,30 @@
/* Native support for Sun 386i, for GDB, the GNU debugger. /* OBSOLETE /* Native support for Sun 386i, for GDB, the GNU debugger. */
Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc. /* OBSOLETE Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc. */
/* OBSOLETE */
This file is part of GDB. /* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
This program is free software; you can redistribute it and/or modify /* OBSOLETE This program is free software; you can redistribute it and/or modify */
it under the terms of the GNU General Public License as published by /* OBSOLETE it under the terms of the GNU General Public License as published by */
the Free Software Foundation; either version 2 of the License, or /* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
(at your option) any later version. /* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
This program is distributed in the hope that it will be useful, /* OBSOLETE This program is distributed in the hope that it will be useful, */
but WITHOUT ANY WARRANTY; without even the implied warranty of /* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
GNU General Public License for more details. /* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
You should have received a copy of the GNU General Public License /* OBSOLETE You should have received a copy of the GNU General Public License */
along with this program; if not, write to the Free Software /* OBSOLETE along with this program; if not, write to the Free Software */
Foundation, Inc., 59 Temple Place - Suite 330, /* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
Boston, MA 02111-1307, USA. */ /* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
#include "regcache.h" /* OBSOLETE #include "regcache.h" */
/* OBSOLETE */
/* Do implement the attach and detach commands. */ /* OBSOLETE /* Do implement the attach and detach commands. */ */
/* OBSOLETE */
#define ATTACH_DETACH /* OBSOLETE #define ATTACH_DETACH */
/* OBSOLETE */
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ /* OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ */
#define FETCH_INFERIOR_REGISTERS /* OBSOLETE #define FETCH_INFERIOR_REGISTERS */
/* OBSOLETE */
#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES) /* OBSOLETE #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES) */

View file

@ -1,5 +1,5 @@
# Host: Sun 386i # OBSOLETE # Host: Sun 386i
XDEPFILES= # OBSOLETE XDEPFILES=
XM_FILE= xm-sun386.h # OBSOLETE XM_FILE= xm-sun386.h
NAT_FILE= nm-sun386.h # OBSOLETE NAT_FILE= nm-sun386.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o sun386-nat.o # OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o sun386-nat.o

View file

@ -1,3 +1,3 @@
# Target: Sun 386i target configuration file. # OBSOLETE # Target: Sun 386i target configuration file.
TDEPFILES= i386-tdep.o solib.o solib-svr4.o solib-legacy.o # OBSOLETE TDEPFILES= i386-tdep.o solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-sun386.h # OBSOLETE TM_FILE= tm-sun386.h

View file

@ -1,204 +1,204 @@
/* Parameters for a Sun 386i target machine, for GDB, the GNU debugger. /* OBSOLETE /* Parameters for a Sun 386i target machine, for GDB, the GNU debugger. */
Copyright 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1999, 2000 /* OBSOLETE Copyright 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1999, 2000 */
Free Software Foundation, Inc. /* OBSOLETE Free Software Foundation, Inc. */
/* OBSOLETE */
This file is part of GDB. /* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
This program is free software; you can redistribute it and/or modify /* OBSOLETE This program is free software; you can redistribute it and/or modify */
it under the terms of the GNU General Public License as published by /* OBSOLETE it under the terms of the GNU General Public License as published by */
the Free Software Foundation; either version 2 of the License, or /* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
(at your option) any later version. /* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
This program is distributed in the hope that it will be useful, /* OBSOLETE This program is distributed in the hope that it will be useful, */
but WITHOUT ANY WARRANTY; without even the implied warranty of /* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
GNU General Public License for more details. /* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
You should have received a copy of the GNU General Public License /* OBSOLETE You should have received a copy of the GNU General Public License */
along with this program; if not, write to the Free Software /* OBSOLETE along with this program; if not, write to the Free Software */
Foundation, Inc., 59 Temple Place - Suite 330, /* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
Boston, MA 02111-1307, USA. */ /* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
#if !defined (TM_SUN386_H) /* OBSOLETE #if !defined (TM_SUN386_H) */
#define TM_SUN386_H 1 /* OBSOLETE #define TM_SUN386_H 1 */
/* OBSOLETE */
#include "regcache.h" /* OBSOLETE #include "regcache.h" */
#include "i386/tm-i386.h" /* OBSOLETE #include "i386/tm-i386.h" */
/* OBSOLETE */
#ifndef sun386 /* OBSOLETE #ifndef sun386 */
#define sun386 /* OBSOLETE #define sun386 */
#endif /* OBSOLETE #endif */
#define SUNOS4 /* OBSOLETE #define SUNOS4 */
#define USE_MACHINE_REG_H /* OBSOLETE #define USE_MACHINE_REG_H */
/* OBSOLETE */
/* Perhaps some day this will work even without the following #define */ /* OBSOLETE /* Perhaps some day this will work even without the following #define */ */
#define COFF_ENCAPSULATE /* OBSOLETE #define COFF_ENCAPSULATE */
/* OBSOLETE */
#ifdef COFF_ENCAPSULATE /* OBSOLETE #ifdef COFF_ENCAPSULATE */
/* Avoid conflicts between our include files and <sys/exec.h> /* OBSOLETE /* Avoid conflicts between our include files and <sys/exec.h> */
(maybe not needed anymore). */ /* OBSOLETE (maybe not needed anymore). */ */
#define _EXEC_ /* OBSOLETE #define _EXEC_ */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
/* sun386 ptrace seems unable to change the frame pointer */ /* OBSOLETE /* sun386 ptrace seems unable to change the frame pointer */ */
#define PTRACE_FP_BUG /* OBSOLETE #define PTRACE_FP_BUG */
/* OBSOLETE */
/* Address of end of stack space. */ /* OBSOLETE /* Address of end of stack space. */ */
/* OBSOLETE */
#define STACK_END_ADDR 0xfc000000 /* OBSOLETE #define STACK_END_ADDR 0xfc000000 */
/* OBSOLETE */
/* Number of machine registers */ /* OBSOLETE /* Number of machine registers */ */
/* OBSOLETE */
#undef NUM_REGS /* OBSOLETE #undef NUM_REGS */
#define NUM_REGS 35 /* OBSOLETE #define NUM_REGS 35 */
/* OBSOLETE */
/* Initializer for an array of names of registers. There should be NUM_REGS /* OBSOLETE /* Initializer for an array of names of registers. There should be NUM_REGS */
strings in this initializer. The order of the first 8 registers must match /* OBSOLETE strings in this initializer. The order of the first 8 registers must match */
the compiler's numbering scheme (which is the same as the 386 scheme) also, /* OBSOLETE the compiler's numbering scheme (which is the same as the 386 scheme) also, */
this table must match regmap in i386-pinsn.c. */ /* OBSOLETE this table must match regmap in i386-pinsn.c. */ */
/* OBSOLETE */
#undef REGISTER_NAMES /* OBSOLETE #undef REGISTER_NAMES */
#define REGISTER_NAMES { "gs", "fs", "es", "ds", \ /* OBSOLETE #define REGISTER_NAMES { "gs", "fs", "es", "ds", \ */
"edi", "esi", "ebp", "esp", \ /* OBSOLETE "edi", "esi", "ebp", "esp", \ */
"ebx", "edx", "ecx", "eax", \ /* OBSOLETE "ebx", "edx", "ecx", "eax", \ */
"retaddr", "trapnum", "errcode", "ip", \ /* OBSOLETE "retaddr", "trapnum", "errcode", "ip", \ */
"cs", "ps", "sp", "ss", \ /* OBSOLETE "cs", "ps", "sp", "ss", \ */
"fst0", "fst1", "fst2", "fst3", \ /* OBSOLETE "fst0", "fst1", "fst2", "fst3", \ */
"fst4", "fst5", "fst6", "fst7", \ /* OBSOLETE "fst4", "fst5", "fst6", "fst7", \ */
"fctrl", "fstat", "ftag", "fip", \ /* OBSOLETE "fctrl", "fstat", "ftag", "fip", \ */
"fcs", "fopoff", "fopsel" \ /* OBSOLETE "fcs", "fopoff", "fopsel" \ */
} /* OBSOLETE } */
/* OBSOLETE */
/* Register numbers of various important registers. /* OBSOLETE /* Register numbers of various important registers. */
Note that some of these values are "real" register numbers, /* OBSOLETE Note that some of these values are "real" register numbers, */
and correspond to the general registers of the machine, /* OBSOLETE and correspond to the general registers of the machine, */
and some are "phony" register numbers which are too large /* OBSOLETE and some are "phony" register numbers which are too large */
to be actual register numbers as far as the user is concerned /* OBSOLETE to be actual register numbers as far as the user is concerned */
but do serve to get the desired values when passed to read_register. */ /* OBSOLETE but do serve to get the desired values when passed to read_register. */ */
/* OBSOLETE */
#undef FP_REGNUM /* OBSOLETE #undef FP_REGNUM */
#define FP_REGNUM 6 /* (ebp) Contains address of executing stack frame */ /* OBSOLETE #define FP_REGNUM 6 /* (ebp) Contains address of executing stack frame */ */
#undef SP_REGNUM /* OBSOLETE #undef SP_REGNUM */
#define SP_REGNUM 18 /* (usp) Contains address of top of stack */ /* OBSOLETE #define SP_REGNUM 18 /* (usp) Contains address of top of stack */ */
#undef PS_REGNUM /* OBSOLETE #undef PS_REGNUM */
#define PS_REGNUM 17 /* (ps) Contains processor status */ /* OBSOLETE #define PS_REGNUM 17 /* (ps) Contains processor status */ */
#undef PC_REGNUM /* OBSOLETE #undef PC_REGNUM */
#define PC_REGNUM 15 /* (eip) Contains program counter */ /* OBSOLETE #define PC_REGNUM 15 /* (eip) Contains program counter */ */
#undef FP0_REGNUM /* OBSOLETE #undef FP0_REGNUM */
#define FP0_REGNUM 20 /* Floating point register 0 */ /* OBSOLETE #define FP0_REGNUM 20 /* Floating point register 0 */ */
#undef FPC_REGNUM /* OBSOLETE #undef FPC_REGNUM */
#define FPC_REGNUM 28 /* 80387 control register */ /* OBSOLETE #define FPC_REGNUM 28 /* 80387 control register */ */
/* OBSOLETE */
/* Total amount of space needed to store our copies of the machine's /* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
register state, the array `registers'. */ /* OBSOLETE register state, the array `registers'. */ */
/* OBSOLETE */
#undef REGISTER_BYTES /* OBSOLETE #undef REGISTER_BYTES */
#define REGISTER_BYTES (20*4+8*10+7*4) /* OBSOLETE #define REGISTER_BYTES (20*4+8*10+7*4) */
/* OBSOLETE */
/* Index within `registers' of the first byte of the space for /* OBSOLETE /* Index within `registers' of the first byte of the space for */
register N. */ /* OBSOLETE register N. */ */
/* OBSOLETE */
#undef REGISTER_BYTE /* OBSOLETE #undef REGISTER_BYTE */
#define REGISTER_BYTE(N) \ /* OBSOLETE #define REGISTER_BYTE(N) \ */
((N) >= FPC_REGNUM ? (((N) - FPC_REGNUM) * 4) + 160 \ /* OBSOLETE ((N) >= FPC_REGNUM ? (((N) - FPC_REGNUM) * 4) + 160 \ */
: (N) >= FP0_REGNUM ? (((N) - FP0_REGNUM) * 10) + 80 \ /* OBSOLETE : (N) >= FP0_REGNUM ? (((N) - FP0_REGNUM) * 10) + 80 \ */
: (N) * 4) /* OBSOLETE : (N) * 4) */
/* OBSOLETE */
/* Number of bytes of storage in the actual machine representation /* OBSOLETE /* Number of bytes of storage in the actual machine representation */
for register N. */ /* OBSOLETE for register N. */ */
/* OBSOLETE */
#undef REGISTER_RAW_SIZE /* OBSOLETE #undef REGISTER_RAW_SIZE */
#define REGISTER_RAW_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 10 : 4) /* OBSOLETE #define REGISTER_RAW_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 10 : 4) */
/* OBSOLETE */
/* Number of bytes of storage in the program's representation /* OBSOLETE /* Number of bytes of storage in the program's representation */
for register N. */ /* OBSOLETE for register N. */ */
/* OBSOLETE */
#undef REGISTER_VIRTUAL_SIZE /* OBSOLETE #undef REGISTER_VIRTUAL_SIZE */
#define REGISTER_VIRTUAL_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 8 : 4) /* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 8 : 4) */
/* OBSOLETE */
/* Nonzero if register N requires conversion /* OBSOLETE /* Nonzero if register N requires conversion */
from raw format to virtual format. */ /* OBSOLETE from raw format to virtual format. */ */
/* OBSOLETE */
#undef REGISTER_CONVERTIBLE /* OBSOLETE #undef REGISTER_CONVERTIBLE */
#define REGISTER_CONVERTIBLE(N) (((unsigned)((N) - FP0_REGNUM)) < 8) /* OBSOLETE #define REGISTER_CONVERTIBLE(N) (((unsigned)((N) - FP0_REGNUM)) < 8) */
/* OBSOLETE */
/* Convert data from raw format for register REGNUM in buffer FROM /* OBSOLETE /* Convert data from raw format for register REGNUM in buffer FROM */
to virtual format with type TYPE in buffer TO. */ /* OBSOLETE to virtual format with type TYPE in buffer TO. */ */
/* OBSOLETE */
#undef REGISTER_CONVERT_TO_VIRTUAL /* OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL */
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ /* OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ */
{ \ /* OBSOLETE { \ */
double val; \ /* OBSOLETE double val; \ */
i387_to_double ((FROM), (char *)&val); \ /* OBSOLETE i387_to_double ((FROM), (char *)&val); \ */
store_floating ((TO), TYPE_LENGTH (TYPE), val); \ /* OBSOLETE store_floating ((TO), TYPE_LENGTH (TYPE), val); \ */
} /* OBSOLETE } */
extern void i387_to_double (char *, char *); /* OBSOLETE extern void i387_to_double (char *, char *); */
/* OBSOLETE */
/* Convert data from virtual format with type TYPE in buffer FROM /* OBSOLETE /* Convert data from virtual format with type TYPE in buffer FROM */
to raw format for register REGNUM in buffer TO. */ /* OBSOLETE to raw format for register REGNUM in buffer TO. */ */
/* OBSOLETE */
#undef REGISTER_CONVERT_TO_RAW /* OBSOLETE #undef REGISTER_CONVERT_TO_RAW */
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ /* OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ */
{ \ /* OBSOLETE { \ */
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ /* OBSOLETE double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ */
double_to_i387((char *)&val, (TO)); \ /* OBSOLETE double_to_i387((char *)&val, (TO)); \ */
} /* OBSOLETE } */
extern void double_to_i387 (char *, char *); /* OBSOLETE extern void double_to_i387 (char *, char *); */
/* OBSOLETE */
/* Return the GDB type object for the "standard" data type /* OBSOLETE /* Return the GDB type object for the "standard" data type */
of data in register N. */ /* OBSOLETE of data in register N. */ */
/* OBSOLETE */
#undef REGISTER_VIRTUAL_TYPE /* OBSOLETE #undef REGISTER_VIRTUAL_TYPE */
#define REGISTER_VIRTUAL_TYPE(N) \ /* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */
(((unsigned)((N) - FP0_REGNUM)) < 8 ? builtin_type_double : builtin_type_int) /* OBSOLETE (((unsigned)((N) - FP0_REGNUM)) < 8 ? builtin_type_double : builtin_type_int) */
/* OBSOLETE */
/* Extract from an array REGBUF containing the (raw) register state /* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
a function return value of type TYPE, and copy that, in virtual format, /* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */
into VALBUF. */ /* OBSOLETE into VALBUF. */ */
/* OBSOLETE */
#undef EXTRACT_RETURN_VALUE /* OBSOLETE #undef EXTRACT_RETURN_VALUE */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ /* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
memcpy (VALBUF, REGBUF + REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), TYPE_LENGTH (TYPE)) /* OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* Write into appropriate registers a function return value /* OBSOLETE /* Write into appropriate registers a function return value */
of type TYPE, given in virtual format. */ /* OBSOLETE of type TYPE, given in virtual format. */ */
/* OBSOLETE */
#undef STORE_RETURN_VALUE /* OBSOLETE #undef STORE_RETURN_VALUE */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \ /* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
write_register_bytes (REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), VALBUF, TYPE_LENGTH (TYPE)) /* OBSOLETE write_register_bytes (REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), VALBUF, TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* Describe the pointer in each stack frame to the previous stack frame /* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */
(its caller). */ /* OBSOLETE (its caller). */ */
/* OBSOLETE */
/* FRAME_CHAIN takes a frame's nominal address /* OBSOLETE /* FRAME_CHAIN takes a frame's nominal address */
and produces the frame's chain-pointer. */ /* OBSOLETE and produces the frame's chain-pointer. */ */
/* OBSOLETE */
#undef FRAME_CHAIN /* OBSOLETE #undef FRAME_CHAIN */
#define FRAME_CHAIN(thisframe) \ /* OBSOLETE #define FRAME_CHAIN(thisframe) \ */
(!inside_entry_file ((thisframe)->pc) ? \ /* OBSOLETE (!inside_entry_file ((thisframe)->pc) ? \ */
read_memory_integer ((thisframe)->frame, 4) :\ /* OBSOLETE read_memory_integer ((thisframe)->frame, 4) :\ */
0) /* OBSOLETE 0) */
/* OBSOLETE */
/* Define other aspects of the stack frame. */ /* OBSOLETE /* Define other aspects of the stack frame. */ */
/* OBSOLETE */
/* A macro that tells us whether the function invocation represented /* OBSOLETE /* A macro that tells us whether the function invocation represented */
by FI does not have a frame on the stack associated with it. If it /* OBSOLETE by FI does not have a frame on the stack associated with it. If it */
does not, FRAMELESS is set to 1, else 0. */ /* OBSOLETE does not, FRAMELESS is set to 1, else 0. */ */
/* OBSOLETE */
#undef FRAMELESS_FUNCTION_INVOCATION /* OBSOLETE #undef FRAMELESS_FUNCTION_INVOCATION */
#define FRAMELESS_FUNCTION_INVOCATION(FI) \ /* OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \ */
(frameless_look_for_prologue (FI)) /* OBSOLETE (frameless_look_for_prologue (FI)) */
/* OBSOLETE */
#undef FRAME_SAVED_PC /* OBSOLETE #undef FRAME_SAVED_PC */
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4)) /* OBSOLETE #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4)) */
/* OBSOLETE */
/* Insert the specified number of args and function address /* OBSOLETE /* Insert the specified number of args and function address */
into a call sequence of the above form stored at DUMMYNAME. */ /* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. */ */
/* OBSOLETE */
#undef FIX_CALL_DUMMY /* OBSOLETE #undef FIX_CALL_DUMMY */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ /* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */
{ \ /* OBSOLETE { \ */
*(int *)((char *)(dummyname) + 1) = (int)(fun) - (pc) - 5; \ /* OBSOLETE *(int *)((char *)(dummyname) + 1) = (int)(fun) - (pc) - 5; \ */
} /* OBSOLETE } */
/* OBSOLETE */
#endif /* !defined (TM_SUN386_H) */ /* OBSOLETE #endif /* !defined (TM_SUN386_H) */ */

View file

@ -1,22 +1,22 @@
/* Host support for Sun 386i, for GDB, the GNU debugger. /* OBSOLETE /* Host support for Sun 386i, for GDB, the GNU debugger. */
Copyright 1986, 1987, 1989, 1992, 1994, 1996 /* OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996 */
Free Software Foundation, Inc. /* OBSOLETE Free Software Foundation, Inc. */
/* OBSOLETE */
This file is part of GDB. /* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
This program is free software; you can redistribute it and/or modify /* OBSOLETE This program is free software; you can redistribute it and/or modify */
it under the terms of the GNU General Public License as published by /* OBSOLETE it under the terms of the GNU General Public License as published by */
the Free Software Foundation; either version 2 of the License, or /* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
(at your option) any later version. /* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
This program is distributed in the hope that it will be useful, /* OBSOLETE This program is distributed in the hope that it will be useful, */
but WITHOUT ANY WARRANTY; without even the implied warranty of /* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
GNU General Public License for more details. /* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
You should have received a copy of the GNU General Public License /* OBSOLETE You should have received a copy of the GNU General Public License */
along with this program; if not, write to the Free Software /* OBSOLETE along with this program; if not, write to the Free Software */
Foundation, Inc., 59 Temple Place - Suite 330, /* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
Boston, MA 02111-1307, USA. */ /* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
#define HOST_BYTE_ORDER LITTLE_ENDIAN /* OBSOLETE #define HOST_BYTE_ORDER LITTLE_ENDIAN */

View file

@ -68,7 +68,7 @@ i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;; i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
i[3456]86-*-sco*) gdb_host=i386sco ;; i[3456]86-*-sco*) gdb_host=i386sco ;;
i[3456]86-*-solaris*) gdb_host=i386sol2 ;; i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
i[3456]86-*-sunos*) gdb_host=sun386 ;; # OBSOLETE i[3456]86-*-sunos*) gdb_host=sun386 ;;
i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;; i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
i[3456]86-*-sysv32*) gdb_host=i386v32 ;; i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
i[3456]86-*-sysv4.2*) gdb_host=i386v42mp ;; i[3456]86-*-sysv4.2*) gdb_host=i386v42mp ;;

View file

@ -101,7 +101,7 @@ i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
i[3456]86-*-lynxos*) gdb_target=i386lynx i[3456]86-*-lynxos*) gdb_target=i386lynx
configdirs="${configdirs} gdbserver" ;; configdirs="${configdirs} gdbserver" ;;
i[3456]86-*-solaris*) gdb_target=i386sol2 ;; i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
i[3456]86-*-sunos*) gdb_target=sun386 ;; # OBSOLETE i[3456]86-*-sunos*) gdb_target=sun386 ;;
i[3456]86-*-sysv4.2*) gdb_target=i386v42mp ;; i[3456]86-*-sysv4.2*) gdb_target=i386v42mp ;;
i[3456]86-*-sysv4*) gdb_target=i386v4 ;; i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
i[3456]86-*-sysv5*) gdb_target=i386v42mp ;; i[3456]86-*-sysv5*) gdb_target=i386v42mp ;;

View file

@ -1,250 +1,250 @@
/* Native support for Sun 386i's for GDB, the GNU debugger. /* OBSOLETE /* Native support for Sun 386i's for GDB, the GNU debugger. */
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1999, 2000, 2001 /* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1999, 2000, 2001 */
Free Software Foundation, Inc. /* OBSOLETE Free Software Foundation, Inc. */
Changes for sun386i by Jean Daniel Fekete (jdf@litp.univ-p6-7.fr), /* OBSOLETE Changes for sun386i by Jean Daniel Fekete (jdf@litp.univ-p6-7.fr), */
C2V Paris, April 89. /* OBSOLETE C2V Paris, April 89. */
/* OBSOLETE */
This file is part of GDB. /* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
This program is free software; you can redistribute it and/or modify /* OBSOLETE This program is free software; you can redistribute it and/or modify */
it under the terms of the GNU General Public License as published by /* OBSOLETE it under the terms of the GNU General Public License as published by */
the Free Software Foundation; either version 2 of the License, or /* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
(at your option) any later version. /* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
This program is distributed in the hope that it will be useful, /* OBSOLETE This program is distributed in the hope that it will be useful, */
but WITHOUT ANY WARRANTY; without even the implied warranty of /* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
GNU General Public License for more details. /* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
You should have received a copy of the GNU General Public License /* OBSOLETE You should have received a copy of the GNU General Public License */
along with this program; if not, write to the Free Software /* OBSOLETE along with this program; if not, write to the Free Software */
Foundation, Inc., 59 Temple Place - Suite 330, /* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
Boston, MA 02111-1307, USA. */ /* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
#include "defs.h" /* OBSOLETE #include "defs.h" */
#include "frame.h" /* OBSOLETE #include "frame.h" */
#include "inferior.h" /* OBSOLETE #include "inferior.h" */
#include "gdbcore.h" /* OBSOLETE #include "gdbcore.h" */
#include "regcache.h" /* OBSOLETE #include "regcache.h" */
/* OBSOLETE */
#include <sys/param.h> /* OBSOLETE #include <sys/param.h> */
#include <sys/dir.h> /* OBSOLETE #include <sys/dir.h> */
#include <sys/user.h> /* OBSOLETE #include <sys/user.h> */
#include <signal.h> /* OBSOLETE #include <signal.h> */
#include <sys/ioctl.h> /* OBSOLETE #include <sys/ioctl.h> */
#include <fcntl.h> /* OBSOLETE #include <fcntl.h> */
/* OBSOLETE */
#include <sys/ptrace.h> /* OBSOLETE #include <sys/ptrace.h> */
#include <machine/reg.h> /* OBSOLETE #include <machine/reg.h> */
/* OBSOLETE */
#include <sys/file.h> /* OBSOLETE #include <sys/file.h> */
#include "gdb_stat.h" /* OBSOLETE #include "gdb_stat.h" */
#include <sys/core.h> /* OBSOLETE #include <sys/core.h> */
/* OBSOLETE */
/* OBSOLETE */
/* Machine-dependent code which would otherwise be in corefile.c */ /* OBSOLETE /* Machine-dependent code which would otherwise be in corefile.c */ */
/* Work with core files, for GDB. */ /* OBSOLETE /* Work with core files, for GDB. */ */
/* OBSOLETE */
/* OBSOLETE */
void /* OBSOLETE void */
core_file_command (char *filename, int from_tty) /* OBSOLETE core_file_command (char *filename, int from_tty) */
{ /* OBSOLETE { */
int val; /* OBSOLETE int val; */
/* OBSOLETE */
/* Discard all vestiges of any previous core file /* OBSOLETE /* Discard all vestiges of any previous core file */
and mark data and stack spaces as empty. */ /* OBSOLETE and mark data and stack spaces as empty. */ */
/* OBSOLETE */
if (corefile) /* OBSOLETE if (corefile) */
xfree (corefile); /* OBSOLETE xfree (corefile); */
corefile = 0; /* OBSOLETE corefile = 0; */
/* OBSOLETE */
if (corechan >= 0) /* OBSOLETE if (corechan >= 0) */
close (corechan); /* OBSOLETE close (corechan); */
corechan = -1; /* OBSOLETE corechan = -1; */
/* OBSOLETE */
data_start = 0; /* OBSOLETE data_start = 0; */
data_end = 0; /* OBSOLETE data_end = 0; */
stack_start = STACK_END_ADDR; /* OBSOLETE stack_start = STACK_END_ADDR; */
stack_end = STACK_END_ADDR; /* OBSOLETE stack_end = STACK_END_ADDR; */
/* OBSOLETE */
/* Now, if a new core file was specified, open it and digest it. */ /* OBSOLETE /* Now, if a new core file was specified, open it and digest it. */ */
/* OBSOLETE */
if (filename) /* OBSOLETE if (filename) */
{ /* OBSOLETE { */
filename = tilde_expand (filename); /* OBSOLETE filename = tilde_expand (filename); */
make_cleanup (xfree, filename); /* OBSOLETE make_cleanup (xfree, filename); */
/* OBSOLETE */
if (have_inferior_p ()) /* OBSOLETE if (have_inferior_p ()) */
error ("To look at a core file, you must kill the program with \"kill\"."); /* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */
corechan = open (filename, O_RDONLY, 0); /* OBSOLETE corechan = open (filename, O_RDONLY, 0); */
if (corechan < 0) /* OBSOLETE if (corechan < 0) */
perror_with_name (filename); /* OBSOLETE perror_with_name (filename); */
/* OBSOLETE */
{ /* OBSOLETE { */
struct core corestr; /* OBSOLETE struct core corestr; */
/* OBSOLETE */
val = myread (corechan, &corestr, sizeof corestr); /* OBSOLETE val = myread (corechan, &corestr, sizeof corestr); */
if (val < 0) /* OBSOLETE if (val < 0) */
perror_with_name (filename); /* OBSOLETE perror_with_name (filename); */
if (corestr.c_magic != CORE_MAGIC) /* OBSOLETE if (corestr.c_magic != CORE_MAGIC) */
error ("\"%s\" does not appear to be a core dump file (magic 0x%x, expected 0x%x)", /* OBSOLETE error ("\"%s\" does not appear to be a core dump file (magic 0x%x, expected 0x%x)", */
filename, corestr.c_magic, (int) CORE_MAGIC); /* OBSOLETE filename, corestr.c_magic, (int) CORE_MAGIC); */
else if (sizeof (struct core) != corestr.c_len) /* OBSOLETE else if (sizeof (struct core) != corestr.c_len) */
error ("\"%s\" has an invalid struct core length (%d, expected %d)", /* OBSOLETE error ("\"%s\" has an invalid struct core length (%d, expected %d)", */
filename, corestr.c_len, (int) sizeof (struct core)); /* OBSOLETE filename, corestr.c_len, (int) sizeof (struct core)); */
/* OBSOLETE */
data_start = exec_data_start; /* OBSOLETE data_start = exec_data_start; */
data_end = data_start + corestr.c_dsize; /* OBSOLETE data_end = data_start + corestr.c_dsize; */
stack_start = stack_end - corestr.c_ssize; /* OBSOLETE stack_start = stack_end - corestr.c_ssize; */
data_offset = sizeof corestr; /* OBSOLETE data_offset = sizeof corestr; */
stack_offset = sizeof corestr + corestr.c_dsize; /* OBSOLETE stack_offset = sizeof corestr + corestr.c_dsize; */
/* OBSOLETE */
memcpy (registers, &corestr.c_regs, sizeof corestr.c_regs); /* OBSOLETE memcpy (registers, &corestr.c_regs, sizeof corestr.c_regs); */
/* OBSOLETE */
memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], /* OBSOLETE memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], */
corestr.c_fpu.f_fpstatus.f_st, /* OBSOLETE corestr.c_fpu.f_fpstatus.f_st, */
sizeof corestr.c_fpu.f_fpstatus.f_st); /* OBSOLETE sizeof corestr.c_fpu.f_fpstatus.f_st); */
memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)], /* OBSOLETE memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)], */
&corestr.c_fpu.f_fpstatus.f_ctrl, /* OBSOLETE &corestr.c_fpu.f_fpstatus.f_ctrl, */
sizeof corestr.c_fpu.f_fpstatus - /* OBSOLETE sizeof corestr.c_fpu.f_fpstatus - */
sizeof corestr.c_fpu.f_fpstatus.f_st); /* OBSOLETE sizeof corestr.c_fpu.f_fpstatus.f_st); */
/* OBSOLETE */
/* the struct aouthdr of sun coff is not the struct exec stored /* OBSOLETE /* the struct aouthdr of sun coff is not the struct exec stored */
in the core file. */ /* OBSOLETE in the core file. */ */
memcpy (&core_aouthdr, &corestr.c_aouthdr, sizeof (struct exec)); /* OBSOLETE memcpy (&core_aouthdr, &corestr.c_aouthdr, sizeof (struct exec)); */
#ifndef COFF_ENCAPSULATE /* OBSOLETE #ifndef COFF_ENCAPSULATE */
core_aouthdr.magic = corestr.c_aouthdr.a_info; /* OBSOLETE core_aouthdr.magic = corestr.c_aouthdr.a_info; */
core_aouthdr.vstamp = /*SUNVERSION */ 31252; /* OBSOLETE core_aouthdr.vstamp = /*SUNVERSION */ 31252; */
#endif /* OBSOLETE #endif */
printf_unfiltered ("Core file is from \"%s\".\n", corestr.c_cmdname); /* OBSOLETE printf_unfiltered ("Core file is from \"%s\".\n", corestr.c_cmdname); */
if (corestr.c_signo > 0) /* OBSOLETE if (corestr.c_signo > 0) */
printf_unfiltered ("Program terminated with signal %d, %s.\n", /* OBSOLETE printf_unfiltered ("Program terminated with signal %d, %s.\n", */
corestr.c_signo, safe_strsignal (corestr.c_signo)); /* OBSOLETE corestr.c_signo, safe_strsignal (corestr.c_signo)); */
} /* OBSOLETE } */
if (filename[0] == '/') /* OBSOLETE if (filename[0] == '/') */
corefile = savestring (filename, strlen (filename)); /* OBSOLETE corefile = savestring (filename, strlen (filename)); */
else /* OBSOLETE else */
{ /* OBSOLETE { */
corefile = concat (current_directory, "/", filename, NULL); /* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */
} /* OBSOLETE } */
/* OBSOLETE */
flush_cached_frames (); /* OBSOLETE flush_cached_frames (); */
select_frame (get_current_frame (), 0); /* OBSOLETE select_frame (get_current_frame (), 0); */
/* OBSOLETE */
validate_files (); /* OBSOLETE validate_files (); */
} /* OBSOLETE } */
else if (from_tty) /* OBSOLETE else if (from_tty) */
printf_unfiltered ("No core file now.\n"); /* OBSOLETE printf_unfiltered ("No core file now.\n"); */
} /* OBSOLETE } */
/* OBSOLETE */
i387_to_double (char *from, char *to) /* OBSOLETE i387_to_double (char *from, char *to) */
{ /* OBSOLETE { */
long *lp; /* OBSOLETE long *lp; */
/* push extended mode on 387 stack, then pop in double mode /* OBSOLETE /* push extended mode on 387 stack, then pop in double mode */
/* OBSOLETE */
* first, set exception masks so no error is generated - /* OBSOLETE * first, set exception masks so no error is generated - */
* number will be rounded to inf or 0, if necessary /* OBSOLETE * number will be rounded to inf or 0, if necessary */
*/ /* OBSOLETE */ */
asm ("pushl %eax"); /* grab a stack slot */ /* OBSOLETE asm ("pushl %eax"); /* grab a stack slot */ */
asm ("fstcw (%esp)"); /* get 387 control word */ /* OBSOLETE asm ("fstcw (%esp)"); /* get 387 control word */ */
asm ("movl (%esp),%eax"); /* save old value */ /* OBSOLETE asm ("movl (%esp),%eax"); /* save old value */ */
asm ("orl $0x3f,%eax"); /* mask all exceptions */ /* OBSOLETE asm ("orl $0x3f,%eax"); /* mask all exceptions */ */
asm ("pushl %eax"); /* OBSOLETE asm ("pushl %eax"); */
asm ("fldcw (%esp)"); /* load new value into 387 */ /* OBSOLETE asm ("fldcw (%esp)"); /* load new value into 387 */ */
/* OBSOLETE */
asm ("movl 8(%ebp),%eax"); /* OBSOLETE asm ("movl 8(%ebp),%eax"); */
asm ("fldt (%eax)"); /* push extended number on 387 stack */ /* OBSOLETE asm ("fldt (%eax)"); /* push extended number on 387 stack */ */
asm ("fwait"); /* OBSOLETE asm ("fwait"); */
asm ("movl 12(%ebp),%eax"); /* OBSOLETE asm ("movl 12(%ebp),%eax"); */
asm ("fstpl (%eax)"); /* pop double */ /* OBSOLETE asm ("fstpl (%eax)"); /* pop double */ */
asm ("fwait"); /* OBSOLETE asm ("fwait"); */
/* OBSOLETE */
asm ("popl %eax"); /* flush modified control word */ /* OBSOLETE asm ("popl %eax"); /* flush modified control word */ */
asm ("fnclex"); /* clear exceptions */ /* OBSOLETE asm ("fnclex"); /* clear exceptions */ */
asm ("fldcw (%esp)"); /* restore original control word */ /* OBSOLETE asm ("fldcw (%esp)"); /* restore original control word */ */
asm ("popl %eax"); /* flush saved copy */ /* OBSOLETE asm ("popl %eax"); /* flush saved copy */ */
} /* OBSOLETE } */
/* OBSOLETE */
double_to_i387 (char *from, char *to) /* OBSOLETE double_to_i387 (char *from, char *to) */
{ /* OBSOLETE { */
/* push double mode on 387 stack, then pop in extended mode /* OBSOLETE /* push double mode on 387 stack, then pop in extended mode */
* no errors are possible because every 64-bit pattern /* OBSOLETE * no errors are possible because every 64-bit pattern */
* can be converted to an extended /* OBSOLETE * can be converted to an extended */
*/ /* OBSOLETE */ */
asm ("movl 8(%ebp),%eax"); /* OBSOLETE asm ("movl 8(%ebp),%eax"); */
asm ("fldl (%eax)"); /* OBSOLETE asm ("fldl (%eax)"); */
asm ("fwait"); /* OBSOLETE asm ("fwait"); */
asm ("movl 12(%ebp),%eax"); /* OBSOLETE asm ("movl 12(%ebp),%eax"); */
asm ("fstpt (%eax)"); /* OBSOLETE asm ("fstpt (%eax)"); */
asm ("fwait"); /* OBSOLETE asm ("fwait"); */
} /* OBSOLETE } */
/* OBSOLETE */
void /* OBSOLETE void */
fetch_inferior_registers (int regno) /* OBSOLETE fetch_inferior_registers (int regno) */
{ /* OBSOLETE { */
struct regs inferior_registers; /* OBSOLETE struct regs inferior_registers; */
struct fp_state inferior_fp_registers; /* OBSOLETE struct fp_state inferior_fp_registers; */
/* OBSOLETE */
registers_fetched (); /* OBSOLETE registers_fetched (); */
/* OBSOLETE */
ptrace (PTRACE_GETREGS, inferior_pid, /* OBSOLETE ptrace (PTRACE_GETREGS, inferior_pid, */
(PTRACE_ARG3_TYPE) & inferior_registers); /* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers); */
ptrace (PTRACE_GETFPREGS, inferior_pid, /* OBSOLETE ptrace (PTRACE_GETFPREGS, inferior_pid, */
(PTRACE_ARG3_TYPE) & inferior_fp_registers); /* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_fp_registers); */
/* OBSOLETE */
memcpy (registers, &inferior_registers, sizeof inferior_registers); /* OBSOLETE memcpy (registers, &inferior_registers, sizeof inferior_registers); */
/* OBSOLETE */
memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.f_st, /* OBSOLETE memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.f_st, */
sizeof inferior_fp_registers.f_st); /* OBSOLETE sizeof inferior_fp_registers.f_st); */
memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)], /* OBSOLETE memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)], */
&inferior_fp_registers.f_ctrl, /* OBSOLETE &inferior_fp_registers.f_ctrl, */
sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st); /* OBSOLETE sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st); */
} /* OBSOLETE } */
/* OBSOLETE */
/* Store our register values back into the inferior. /* OBSOLETE /* Store our register values back into the inferior. */
If REGNO is -1, do this for all registers. /* OBSOLETE If REGNO is -1, do this for all registers. */
Otherwise, REGNO specifies which register (so we can save time). */ /* OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */ */
/* OBSOLETE */
void /* OBSOLETE void */
store_inferior_registers (int regno) /* OBSOLETE store_inferior_registers (int regno) */
{ /* OBSOLETE { */
struct regs inferior_registers; /* OBSOLETE struct regs inferior_registers; */
struct fp_state inferior_fp_registers; /* OBSOLETE struct fp_state inferior_fp_registers; */
/* OBSOLETE */
memcpy (&inferior_registers, registers, 20 * 4); /* OBSOLETE memcpy (&inferior_registers, registers, 20 * 4); */
/* OBSOLETE */
memcpy (inferior_fp_registers.f_st, /* OBSOLETE memcpy (inferior_fp_registers.f_st, */
&registers[REGISTER_BYTE (FP0_REGNUM)], /* OBSOLETE &registers[REGISTER_BYTE (FP0_REGNUM)], */
sizeof inferior_fp_registers.f_st); /* OBSOLETE sizeof inferior_fp_registers.f_st); */
memcpy (&inferior_fp_registers.f_ctrl, /* OBSOLETE memcpy (&inferior_fp_registers.f_ctrl, */
&registers[REGISTER_BYTE (FPC_REGNUM)], /* OBSOLETE &registers[REGISTER_BYTE (FPC_REGNUM)], */
sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st); /* OBSOLETE sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st); */
/* OBSOLETE */
#ifdef PTRACE_FP_BUG /* OBSOLETE #ifdef PTRACE_FP_BUG */
if (regno == FP_REGNUM || regno == -1) /* OBSOLETE if (regno == FP_REGNUM || regno == -1) */
/* Storing the frame pointer requires a gross hack, in which an /* OBSOLETE /* Storing the frame pointer requires a gross hack, in which an */
instruction that moves eax into ebp gets single-stepped. */ /* OBSOLETE instruction that moves eax into ebp gets single-stepped. */ */
{ /* OBSOLETE { */
int stack = inferior_registers.r_reg[SP_REGNUM]; /* OBSOLETE int stack = inferior_registers.r_reg[SP_REGNUM]; */
int stuff = ptrace (PTRACE_PEEKDATA, inferior_pid, /* OBSOLETE int stuff = ptrace (PTRACE_PEEKDATA, inferior_pid, */
(PTRACE_ARG3_TYPE) stack); /* OBSOLETE (PTRACE_ARG3_TYPE) stack); */
int reg = inferior_registers.r_reg[EAX]; /* OBSOLETE int reg = inferior_registers.r_reg[EAX]; */
inferior_registers.r_reg[EAX] = /* OBSOLETE inferior_registers.r_reg[EAX] = */
inferior_registers.r_reg[FP_REGNUM]; /* OBSOLETE inferior_registers.r_reg[FP_REGNUM]; */
ptrace (PTRACE_SETREGS, inferior_pid, /* OBSOLETE ptrace (PTRACE_SETREGS, inferior_pid, */
(PTRACE_ARG3_TYPE) & inferior_registers); /* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers); */
ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, /* OBSOLETE ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, */
0xc589); /* OBSOLETE 0xc589); */
ptrace (PTRACE_SINGLESTEP, inferior_pid, (PTRACE_ARG3_TYPE) stack, /* OBSOLETE ptrace (PTRACE_SINGLESTEP, inferior_pid, (PTRACE_ARG3_TYPE) stack, */
0); /* OBSOLETE 0); */
wait (0); /* OBSOLETE wait (0); */
ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, /* OBSOLETE ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, */
stuff); /* OBSOLETE stuff); */
inferior_registers.r_reg[EAX] = reg; /* OBSOLETE inferior_registers.r_reg[EAX] = reg; */
} /* OBSOLETE } */
#endif /* OBSOLETE #endif */
ptrace (PTRACE_SETREGS, inferior_pid, /* OBSOLETE ptrace (PTRACE_SETREGS, inferior_pid, */
(PTRACE_ARG3_TYPE) & inferior_registers); /* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers); */
ptrace (PTRACE_SETFPREGS, inferior_pid, /* OBSOLETE ptrace (PTRACE_SETFPREGS, inferior_pid, */
(PTRACE_ARG3_TYPE) & inferior_fp_registers); /* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_fp_registers); */
} /* OBSOLETE } */