From 7e24f0b11e08877eaf49a9aa0998b4200ce09961 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 1 Dec 2001 22:19:30 +0000 Subject: Zap Sun's i386i. --- gdb/ChangeLog | 11 ++ gdb/Makefile.in | 2 - gdb/NEWS | 1 + gdb/config/i386/nm-sun386.h | 30 ------ gdb/config/i386/sun386.mh | 5 - gdb/config/i386/sun386.mt | 3 - gdb/config/i386/tm-sun386.h | 204 ------------------------------------ gdb/config/i386/xm-sun386.h | 22 ---- gdb/configure.host | 1 - gdb/configure.tgt | 1 - gdb/sun386-nat.c | 250 -------------------------------------------- 11 files changed, 12 insertions(+), 518 deletions(-) delete mode 100644 gdb/config/i386/nm-sun386.h delete mode 100644 gdb/config/i386/sun386.mh delete mode 100644 gdb/config/i386/sun386.mt delete mode 100644 gdb/config/i386/tm-sun386.h delete mode 100644 gdb/config/i386/xm-sun386.h delete mode 100644 gdb/sun386-nat.c diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c405da8..9216fc5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2001-12-01 Andrew Cagney + * NEWS: Note that i[3456]86-*-sunos* was deleted. + * Makefile.in (sun386-nat.o): Delete. + * configure.tgt: Delete i[3456]86-*-sunos* target. + * configure.host: Delete i[3456]86-*-sunos* host. + * sun386-nat.c: Delete.file. + * config/i386/nm-sun386.h: Delete file. + * config/i386/sun386.mh: Delete file. + * config/i386/sun386.mt: Delete file. + * config/i386/tm-sun386.h: Delete file. + * config/i386/xm-sun386.h: Delete file. + * NEWS: Note that ns32k-*-mach3*, ns32k-umax-*, ns32k-utek-sysv* and ns32k-utek-* were deleted. * Makefile.in (ultra3-nat.o, ultra3-xdep.o): Delete. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 6115848..29e72d0 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2062,8 +2062,6 @@ 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) -# 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) \ $(expression_h) $(gdb_stabs_h) $(gdbcmd_h) $(gdbcore_h) \ $(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \ diff --git a/gdb/NEWS b/gdb/NEWS index 9ce7dbe..3d93bb9 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -17,6 +17,7 @@ PowerPC Netware powerpc-*-netware* Harris/CXUX m88k m88*-harris-cxux* Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-* ns32k-utek-sysv* ns32k-utek-* +SunOS 4.0.Xi on i386 i[3456]86-*-sunos* * Changes to command line processing diff --git a/gdb/config/i386/nm-sun386.h b/gdb/config/i386/nm-sun386.h deleted file mode 100644 index 887ce69..0000000 --- a/gdb/config/i386/nm-sun386.h +++ /dev/null @@ -1,30 +0,0 @@ -/* OBSOLETE /* Native support for Sun 386i, for GDB, the GNU debugger. */ -/* OBSOLETE Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. */ */ -/* OBSOLETE */ -/* OBSOLETE #include "regcache.h" */ -/* OBSOLETE */ -/* OBSOLETE /* Do implement the attach and detach commands. */ */ -/* OBSOLETE */ -/* OBSOLETE #define ATTACH_DETACH */ -/* OBSOLETE */ -/* OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ */ -/* OBSOLETE #define FETCH_INFERIOR_REGISTERS */ -/* OBSOLETE */ -/* OBSOLETE #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES) */ diff --git a/gdb/config/i386/sun386.mh b/gdb/config/i386/sun386.mh deleted file mode 100644 index f7b65d5..0000000 --- a/gdb/config/i386/sun386.mh +++ /dev/null @@ -1,5 +0,0 @@ -# OBSOLETE # Host: Sun 386i -# OBSOLETE XDEPFILES= -# OBSOLETE XM_FILE= xm-sun386.h -# OBSOLETE NAT_FILE= nm-sun386.h -# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o sun386-nat.o diff --git a/gdb/config/i386/sun386.mt b/gdb/config/i386/sun386.mt deleted file mode 100644 index e10b028..0000000 --- a/gdb/config/i386/sun386.mt +++ /dev/null @@ -1,3 +0,0 @@ -# OBSOLETE # Target: Sun 386i target configuration file. -# OBSOLETE TDEPFILES= i386-tdep.o solib.o solib-sunos.o -# OBSOLETE TM_FILE= tm-sun386.h diff --git a/gdb/config/i386/tm-sun386.h b/gdb/config/i386/tm-sun386.h deleted file mode 100644 index bc18f17..0000000 --- a/gdb/config/i386/tm-sun386.h +++ /dev/null @@ -1,204 +0,0 @@ -/* OBSOLETE /* Parameters for a Sun 386i target machine, for GDB, the GNU debugger. */ -/* OBSOLETE Copyright 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1999, 2000 */ -/* OBSOLETE Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. */ */ -/* OBSOLETE */ -/* OBSOLETE #if !defined (TM_SUN386_H) */ -/* OBSOLETE #define TM_SUN386_H 1 */ -/* OBSOLETE */ -/* OBSOLETE #include "regcache.h" */ -/* OBSOLETE #include "i386/tm-i386.h" */ -/* OBSOLETE */ -/* OBSOLETE #ifndef sun386 */ -/* OBSOLETE #define sun386 */ -/* OBSOLETE #endif */ -/* OBSOLETE #define SUNOS4 */ -/* OBSOLETE #define USE_MACHINE_REG_H */ -/* OBSOLETE */ -/* OBSOLETE /* Perhaps some day this will work even without the following #define */ */ -/* OBSOLETE #define COFF_ENCAPSULATE */ -/* OBSOLETE */ -/* OBSOLETE #ifdef COFF_ENCAPSULATE */ -/* OBSOLETE /* Avoid conflicts between our include files and */ -/* OBSOLETE (maybe not needed anymore). */ */ -/* OBSOLETE #define _EXEC_ */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* sun386 ptrace seems unable to change the frame pointer */ */ -/* OBSOLETE #define PTRACE_FP_BUG */ -/* OBSOLETE */ -/* OBSOLETE /* Address of end of stack space. */ */ -/* OBSOLETE */ -/* OBSOLETE #define STACK_END_ADDR 0xfc000000 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of machine registers */ */ -/* OBSOLETE */ -/* OBSOLETE #undef NUM_REGS */ -/* OBSOLETE #define NUM_REGS 35 */ -/* OBSOLETE */ -/* OBSOLETE /* Initializer for an array of names of registers. There should be NUM_REGS */ -/* OBSOLETE strings in this initializer. The order of the first 8 registers must match */ -/* OBSOLETE the compiler's numbering scheme (which is the same as the 386 scheme) also, */ -/* OBSOLETE this table must match regmap in i386-pinsn.c. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_NAMES */ -/* OBSOLETE #define REGISTER_NAMES { "gs", "fs", "es", "ds", \ */ -/* OBSOLETE "edi", "esi", "ebp", "esp", \ */ -/* OBSOLETE "ebx", "edx", "ecx", "eax", \ */ -/* OBSOLETE "retaddr", "trapnum", "errcode", "ip", \ */ -/* OBSOLETE "cs", "ps", "sp", "ss", \ */ -/* OBSOLETE "fst0", "fst1", "fst2", "fst3", \ */ -/* OBSOLETE "fst4", "fst5", "fst6", "fst7", \ */ -/* OBSOLETE "fctrl", "fstat", "ftag", "fip", \ */ -/* OBSOLETE "fcs", "fopoff", "fopsel" \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Register numbers of various important registers. */ -/* OBSOLETE Note that some of these values are "real" register numbers, */ -/* OBSOLETE and correspond to the general registers of the machine, */ -/* OBSOLETE and some are "phony" register numbers which are too large */ -/* OBSOLETE to be actual register numbers as far as the user is concerned */ -/* OBSOLETE but do serve to get the desired values when passed to read_register. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef FP_REGNUM */ -/* OBSOLETE #define FP_REGNUM 6 /* (ebp) Contains address of executing stack frame */ */ -/* OBSOLETE #undef SP_REGNUM */ -/* OBSOLETE #define SP_REGNUM 18 /* (usp) Contains address of top of stack */ */ -/* OBSOLETE #undef PS_REGNUM */ -/* OBSOLETE #define PS_REGNUM 17 /* (ps) Contains processor status */ */ -/* OBSOLETE #undef PC_REGNUM */ -/* OBSOLETE #define PC_REGNUM 15 /* (eip) Contains program counter */ */ -/* OBSOLETE #undef FP0_REGNUM */ -/* OBSOLETE #define FP0_REGNUM 20 /* Floating point register 0 */ */ -/* OBSOLETE #undef FPC_REGNUM */ -/* OBSOLETE #define FPC_REGNUM 28 /* 80387 control register */ */ -/* OBSOLETE */ -/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */ -/* OBSOLETE register state, the array `registers'. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_BYTES */ -/* OBSOLETE #define REGISTER_BYTES (20*4+8*10+7*4) */ -/* OBSOLETE */ -/* OBSOLETE /* Index within `registers' of the first byte of the space for */ -/* OBSOLETE register N. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_BYTE */ -/* OBSOLETE #define REGISTER_BYTE(N) \ */ -/* OBSOLETE ((N) >= FPC_REGNUM ? (((N) - FPC_REGNUM) * 4) + 160 \ */ -/* OBSOLETE : (N) >= FP0_REGNUM ? (((N) - FP0_REGNUM) * 10) + 80 \ */ -/* OBSOLETE : (N) * 4) */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the actual machine representation */ -/* OBSOLETE for register N. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_RAW_SIZE */ -/* OBSOLETE #define REGISTER_RAW_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 10 : 4) */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the program's representation */ -/* OBSOLETE for register N. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_VIRTUAL_SIZE */ -/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 8 : 4) */ -/* OBSOLETE */ -/* OBSOLETE /* Nonzero if register N requires conversion */ -/* OBSOLETE from raw format to virtual format. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_CONVERTIBLE */ -/* OBSOLETE #define REGISTER_CONVERTIBLE(N) (((unsigned)((N) - FP0_REGNUM)) < 8) */ -/* OBSOLETE */ -/* OBSOLETE /* Convert data from raw format for register REGNUM in buffer FROM */ -/* OBSOLETE to virtual format with type TYPE in buffer TO. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL */ -/* OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ */ -/* OBSOLETE { \ */ -/* OBSOLETE double val; \ */ -/* OBSOLETE i387_to_double ((FROM), (char *)&val); \ */ -/* OBSOLETE store_floating ((TO), TYPE_LENGTH (TYPE), val); \ */ -/* OBSOLETE } */ -/* OBSOLETE extern void i387_to_double (char *, char *); */ -/* OBSOLETE */ -/* OBSOLETE /* Convert data from virtual format with type TYPE in buffer FROM */ -/* OBSOLETE to raw format for register REGNUM in buffer TO. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_CONVERT_TO_RAW */ -/* OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ */ -/* OBSOLETE { \ */ -/* OBSOLETE double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ */ -/* OBSOLETE double_to_i387((char *)&val, (TO)); \ */ -/* OBSOLETE } */ -/* OBSOLETE extern void double_to_i387 (char *, char *); */ -/* OBSOLETE */ -/* OBSOLETE /* Return the GDB type object for the "standard" data type */ -/* OBSOLETE of data in register N. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef REGISTER_VIRTUAL_TYPE */ -/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */ -/* OBSOLETE (((unsigned)((N) - FP0_REGNUM)) < 8 ? builtin_type_double : builtin_type_int) */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */ -/* OBSOLETE into VALBUF. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef EXTRACT_RETURN_VALUE */ -/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */ -/* OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Write into appropriate registers a function return value */ -/* OBSOLETE of type TYPE, given in virtual format. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef STORE_RETURN_VALUE */ -/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */ -/* OBSOLETE write_register_bytes (REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), VALBUF, TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */ -/* OBSOLETE (its caller). */ */ -/* OBSOLETE */ -/* OBSOLETE /* FRAME_CHAIN takes a frame's nominal address */ -/* OBSOLETE and produces the frame's chain-pointer. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef FRAME_CHAIN */ -/* OBSOLETE #define FRAME_CHAIN(thisframe) \ */ -/* OBSOLETE (!inside_entry_file ((thisframe)->pc) ? \ */ -/* OBSOLETE read_memory_integer ((thisframe)->frame, 4) :\ */ -/* OBSOLETE 0) */ -/* OBSOLETE */ -/* OBSOLETE /* Define other aspects of the stack frame. */ */ -/* OBSOLETE */ -/* OBSOLETE /* A macro that tells us whether the function invocation represented */ -/* OBSOLETE by FI does not have a frame on the stack associated with it. If it */ -/* OBSOLETE does not, FRAMELESS is set to 1, else 0. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef FRAMELESS_FUNCTION_INVOCATION */ -/* OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \ */ -/* OBSOLETE (frameless_look_for_prologue (FI)) */ -/* OBSOLETE */ -/* OBSOLETE #undef FRAME_SAVED_PC */ -/* OBSOLETE #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4)) */ -/* OBSOLETE */ -/* OBSOLETE /* Insert the specified number of args and function address */ -/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. */ */ -/* OBSOLETE */ -/* OBSOLETE #undef FIX_CALL_DUMMY */ -/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */ -/* OBSOLETE { \ */ -/* OBSOLETE *(int *)((char *)(dummyname) + 1) = (int)(fun) - (pc) - 5; \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #endif /* !defined (TM_SUN386_H) */ */ diff --git a/gdb/config/i386/xm-sun386.h b/gdb/config/i386/xm-sun386.h deleted file mode 100644 index 0cd798b..0000000 --- a/gdb/config/i386/xm-sun386.h +++ /dev/null @@ -1,22 +0,0 @@ -/* OBSOLETE /* Host support for Sun 386i, for GDB, the GNU debugger. */ -/* OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996 */ -/* OBSOLETE Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. */ */ -/* OBSOLETE */ -/* OBSOLETE #define HOST_BYTE_ORDER LITTLE_ENDIAN */ diff --git a/gdb/configure.host b/gdb/configure.host index 9fa931f..0a416d4 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -71,7 +71,6 @@ i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;; i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;; i[3456]86-*-sco*) gdb_host=i386sco ;; i[3456]86-*-solaris*) gdb_host=i386sol2 ;; -# OBSOLETE i[3456]86-*-sunos*) gdb_host=sun386 ;; i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;; i[3456]86-*-sysv32*) gdb_host=i386v32 ;; i[3456]86-*-sysv4.2*) gdb_host=i386v42mp ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index e38a83f..340d0af 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -105,7 +105,6 @@ i[3456]86-*-lynxos*) gdb_target=i386lynx configdirs="${configdirs} gdbserver" ;; i[3456]86-*-openbsd*) gdb_target=obsd ;; i[3456]86-*-solaris*) gdb_target=i386sol2 ;; -# OBSOLETE i[3456]86-*-sunos*) gdb_target=sun386 ;; i[3456]86-*-sysv4.2*) gdb_target=i386v42mp ;; i[3456]86-*-sysv4*) gdb_target=i386v4 ;; i[3456]86-*-sysv5*) gdb_target=i386v42mp ;; diff --git a/gdb/sun386-nat.c b/gdb/sun386-nat.c deleted file mode 100644 index eef89fc..0000000 --- a/gdb/sun386-nat.c +++ /dev/null @@ -1,250 +0,0 @@ -/* OBSOLETE /* Native support for Sun 386i's for GDB, the GNU debugger. */ -/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1999, 2000, 2001 */ -/* OBSOLETE Free Software Foundation, Inc. */ -/* OBSOLETE Changes for sun386i by Jean Daniel Fekete (jdf@litp.univ-p6-7.fr), */ -/* OBSOLETE C2V Paris, April 89. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. */ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "frame.h" */ -/* OBSOLETE #include "inferior.h" */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE #include "regcache.h" */ -/* OBSOLETE */ -/* OBSOLETE #include */ -/* OBSOLETE #include */ -/* OBSOLETE #include */ -/* OBSOLETE #include */ -/* OBSOLETE #include */ -/* OBSOLETE #include */ -/* OBSOLETE */ -/* OBSOLETE #include */ -/* OBSOLETE #include */ -/* OBSOLETE */ -/* OBSOLETE #include */ -/* OBSOLETE #include "gdb_stat.h" */ -/* OBSOLETE #include */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Machine-dependent code which would otherwise be in corefile.c */ */ -/* OBSOLETE /* Work with core files, for GDB. */ */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE core_file_command (char *filename, int from_tty) */ -/* OBSOLETE { */ -/* OBSOLETE int val; */ -/* OBSOLETE */ -/* OBSOLETE /* Discard all vestiges of any previous core file */ -/* OBSOLETE and mark data and stack spaces as empty. */ */ -/* OBSOLETE */ -/* OBSOLETE if (corefile) */ -/* OBSOLETE xfree (corefile); */ -/* OBSOLETE corefile = 0; */ -/* OBSOLETE */ -/* OBSOLETE if (corechan >= 0) */ -/* OBSOLETE close (corechan); */ -/* OBSOLETE corechan = -1; */ -/* OBSOLETE */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end = 0; */ -/* OBSOLETE stack_start = STACK_END_ADDR; */ -/* OBSOLETE stack_end = STACK_END_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. */ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */ -/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */ -/* OBSOLETE if (corechan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE { */ -/* OBSOLETE struct core corestr; */ -/* OBSOLETE */ -/* OBSOLETE val = myread (corechan, &corestr, sizeof corestr); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE if (corestr.c_magic != CORE_MAGIC) */ -/* OBSOLETE error ("\"%s\" does not appear to be a core dump file (magic 0x%x, expected 0x%x)", */ -/* OBSOLETE filename, corestr.c_magic, (int) CORE_MAGIC); */ -/* OBSOLETE else if (sizeof (struct core) != corestr.c_len) */ -/* OBSOLETE error ("\"%s\" has an invalid struct core length (%d, expected %d)", */ -/* OBSOLETE filename, corestr.c_len, (int) sizeof (struct core)); */ -/* OBSOLETE */ -/* OBSOLETE data_start = exec_data_start; */ -/* OBSOLETE data_end = data_start + corestr.c_dsize; */ -/* OBSOLETE stack_start = stack_end - corestr.c_ssize; */ -/* OBSOLETE data_offset = sizeof corestr; */ -/* OBSOLETE stack_offset = sizeof corestr + corestr.c_dsize; */ -/* OBSOLETE */ -/* OBSOLETE memcpy (registers, &corestr.c_regs, sizeof corestr.c_regs); */ -/* OBSOLETE */ -/* OBSOLETE memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], */ -/* OBSOLETE corestr.c_fpu.f_fpstatus.f_st, */ -/* OBSOLETE sizeof corestr.c_fpu.f_fpstatus.f_st); */ -/* OBSOLETE memcpy (®isters[REGISTER_BYTE (FPC_REGNUM)], */ -/* OBSOLETE &corestr.c_fpu.f_fpstatus.f_ctrl, */ -/* OBSOLETE sizeof corestr.c_fpu.f_fpstatus - */ -/* OBSOLETE sizeof corestr.c_fpu.f_fpstatus.f_st); */ -/* OBSOLETE */ -/* OBSOLETE /* the struct aouthdr of sun coff is not the struct exec stored */ -/* OBSOLETE in the core file. */ */ -/* OBSOLETE memcpy (&core_aouthdr, &corestr.c_aouthdr, sizeof (struct exec)); */ -/* OBSOLETE #ifndef COFF_ENCAPSULATE */ -/* OBSOLETE core_aouthdr.magic = corestr.c_aouthdr.a_info; */ -/* OBSOLETE core_aouthdr.vstamp = /*SUNVERSION */ 31252; */ -/* OBSOLETE #endif */ -/* OBSOLETE printf_unfiltered ("Core file is from \"%s\".\n", corestr.c_cmdname); */ -/* OBSOLETE if (corestr.c_signo > 0) */ -/* OBSOLETE printf_unfiltered ("Program terminated with signal %d, %s.\n", */ -/* OBSOLETE corestr.c_signo, safe_strsignal (corestr.c_signo)); */ -/* OBSOLETE } */ -/* OBSOLETE if (filename[0] == '/') */ -/* OBSOLETE corefile = savestring (filename, strlen (filename)); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE flush_cached_frames (); */ -/* OBSOLETE select_frame (get_current_frame (), 0); */ -/* OBSOLETE */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf_unfiltered ("No core file now.\n"); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE i387_to_double (char *from, char *to) */ -/* OBSOLETE { */ -/* OBSOLETE long *lp; */ -/* OBSOLETE /* push extended mode on 387 stack, then pop in double mode */ -/* OBSOLETE */ -/* OBSOLETE * first, set exception masks so no error is generated - */ -/* OBSOLETE * number will be rounded to inf or 0, if necessary */ -/* OBSOLETE */ */ -/* OBSOLETE asm ("pushl %eax"); /* grab a stack slot */ */ -/* OBSOLETE asm ("fstcw (%esp)"); /* get 387 control word */ */ -/* OBSOLETE asm ("movl (%esp),%eax"); /* save old value */ */ -/* OBSOLETE asm ("orl $0x3f,%eax"); /* mask all exceptions */ */ -/* OBSOLETE asm ("pushl %eax"); */ -/* OBSOLETE asm ("fldcw (%esp)"); /* load new value into 387 */ */ -/* OBSOLETE */ -/* OBSOLETE asm ("movl 8(%ebp),%eax"); */ -/* OBSOLETE asm ("fldt (%eax)"); /* push extended number on 387 stack */ */ -/* OBSOLETE asm ("fwait"); */ -/* OBSOLETE asm ("movl 12(%ebp),%eax"); */ -/* OBSOLETE asm ("fstpl (%eax)"); /* pop double */ */ -/* OBSOLETE asm ("fwait"); */ -/* OBSOLETE */ -/* OBSOLETE asm ("popl %eax"); /* flush modified control word */ */ -/* OBSOLETE asm ("fnclex"); /* clear exceptions */ */ -/* OBSOLETE asm ("fldcw (%esp)"); /* restore original control word */ */ -/* OBSOLETE asm ("popl %eax"); /* flush saved copy */ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE double_to_i387 (char *from, char *to) */ -/* OBSOLETE { */ -/* OBSOLETE /* push double mode on 387 stack, then pop in extended mode */ -/* OBSOLETE * no errors are possible because every 64-bit pattern */ -/* OBSOLETE * can be converted to an extended */ -/* OBSOLETE */ */ -/* OBSOLETE asm ("movl 8(%ebp),%eax"); */ -/* OBSOLETE asm ("fldl (%eax)"); */ -/* OBSOLETE asm ("fwait"); */ -/* OBSOLETE asm ("movl 12(%ebp),%eax"); */ -/* OBSOLETE asm ("fstpt (%eax)"); */ -/* OBSOLETE asm ("fwait"); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE fetch_inferior_registers (int regno) */ -/* OBSOLETE { */ -/* OBSOLETE struct regs inferior_registers; */ -/* OBSOLETE struct fp_state inferior_fp_registers; */ -/* OBSOLETE */ -/* OBSOLETE registers_fetched (); */ -/* OBSOLETE */ -/* OBSOLETE ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid), */ -/* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers); */ -/* OBSOLETE ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid), */ -/* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_fp_registers); */ -/* OBSOLETE */ -/* OBSOLETE memcpy (registers, &inferior_registers, sizeof inferior_registers); */ -/* OBSOLETE */ -/* OBSOLETE memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.f_st, */ -/* OBSOLETE sizeof inferior_fp_registers.f_st); */ -/* OBSOLETE memcpy (®isters[REGISTER_BYTE (FPC_REGNUM)], */ -/* OBSOLETE &inferior_fp_registers.f_ctrl, */ -/* OBSOLETE sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Store our register values back into the inferior. */ -/* OBSOLETE If REGNO is -1, do this for all registers. */ -/* OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE store_inferior_registers (int regno) */ -/* OBSOLETE { */ -/* OBSOLETE struct regs inferior_registers; */ -/* OBSOLETE struct fp_state inferior_fp_registers; */ -/* OBSOLETE */ -/* OBSOLETE memcpy (&inferior_registers, registers, 20 * 4); */ -/* OBSOLETE */ -/* OBSOLETE memcpy (inferior_fp_registers.f_st, */ -/* OBSOLETE ®isters[REGISTER_BYTE (FP0_REGNUM)], */ -/* OBSOLETE sizeof inferior_fp_registers.f_st); */ -/* OBSOLETE memcpy (&inferior_fp_registers.f_ctrl, */ -/* OBSOLETE ®isters[REGISTER_BYTE (FPC_REGNUM)], */ -/* OBSOLETE sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st); */ -/* OBSOLETE */ -/* OBSOLETE #ifdef PTRACE_FP_BUG */ -/* OBSOLETE if (regno == FP_REGNUM || regno == -1) */ -/* OBSOLETE /* Storing the frame pointer requires a gross hack, in which an */ -/* OBSOLETE instruction that moves eax into ebp gets single-stepped. */ */ -/* OBSOLETE { */ -/* OBSOLETE int stack = inferior_registers.r_reg[SP_REGNUM]; */ -/* OBSOLETE int stuff = ptrace (PTRACE_PEEKDATA, PIDGET (inferior_ptid), */ -/* OBSOLETE (PTRACE_ARG3_TYPE) stack); */ -/* OBSOLETE int reg = inferior_registers.r_reg[EAX]; */ -/* OBSOLETE inferior_registers.r_reg[EAX] = */ -/* OBSOLETE inferior_registers.r_reg[FP_REGNUM]; */ -/* OBSOLETE ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid), */ -/* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers); */ -/* OBSOLETE ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) stack, */ -/* OBSOLETE 0xc589); */ -/* OBSOLETE ptrace (PTRACE_SINGLESTEP, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) stack, */ -/* OBSOLETE 0); */ -/* OBSOLETE wait (0); */ -/* OBSOLETE ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) stack, */ -/* OBSOLETE stuff); */ -/* OBSOLETE inferior_registers.r_reg[EAX] = reg; */ -/* OBSOLETE } */ -/* OBSOLETE #endif */ -/* OBSOLETE ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid), */ -/* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers); */ -/* OBSOLETE ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid), */ -/* OBSOLETE (PTRACE_ARG3_TYPE) & inferior_fp_registers); */ -/* OBSOLETE } */ -- cgit v1.1