diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-04-09 16:19:52 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-04-09 16:19:52 +0000 |
commit | 2fbce69179c6c47b68e24e3bca6c729fec4a918d (patch) | |
tree | 79608a49d3531faa7a827ef9fe7b419d483d6d60 /gdb | |
parent | 78c4394505f43dd76f1b7ec1ebe021d3544ccc32 (diff) | |
download | gdb-2fbce69179c6c47b68e24e3bca6c729fec4a918d.zip gdb-2fbce69179c6c47b68e24e3bca6c729fec4a918d.tar.gz gdb-2fbce69179c6c47b68e24e3bca6c729fec4a918d.tar.bz2 |
2003-04-09 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that the "Sequent family" is obsolete.
* configure.tgt: Obsolete i[3456]86-sequent-bsd*,
i[3456]86-sequent-sysv4*, and i[3456]86-sequent-sysv*.
* configure.host: Obsolete i[3456]86-sequent-bsd*,
i[3456]86-sequent-sysv4*, and i[3456]86-sequent-sysv*.
* config/i386/tm-ptx4.h: Obsolete file.
* config/i386/tm-ptx.h: Obsolete file.
* symm-tdep.c: Obsolete file.
* config/i386/symmetry.mt: Obsolete file.
* config/i386/tm-symmetry.h: Obsolete file.
* symm-nat.c: Obsolete file.
* config/i386/nm-symmetry.h: Obsolete file.
* config/i386/xm-symmetry.h: Obsolete file.
* config/i386/symmetry.mh: Obsolete file.
* config/i386/nm-ptx4.h: Obsolete file.
* config/i386/ptx4.mh: Obsolete file.
* config/i386/ptx.mt: Obsolete file.
* config/i386/ptx.mh: Obsolete file.
* config/i386/xm-ptx4.h: Obsolete file.
* config/i386/xm-ptx.h: Obsolete file.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 23 | ||||
-rw-r--r-- | gdb/NEWS | 3 | ||||
-rw-r--r-- | gdb/config/i386/nm-ptx4.h | 132 | ||||
-rw-r--r-- | gdb/config/i386/nm-symmetry.h | 100 | ||||
-rw-r--r-- | gdb/config/i386/ptx.mh | 14 | ||||
-rw-r--r-- | gdb/config/i386/ptx.mt | 6 | ||||
-rw-r--r-- | gdb/config/i386/ptx4.mh | 16 | ||||
-rw-r--r-- | gdb/config/i386/ptx4.mt | 6 | ||||
-rw-r--r-- | gdb/config/i386/symmetry.mh | 8 | ||||
-rw-r--r-- | gdb/config/i386/symmetry.mt | 6 | ||||
-rw-r--r-- | gdb/config/i386/tm-ptx.h | 388 | ||||
-rw-r--r-- | gdb/config/i386/tm-ptx4.h | 52 | ||||
-rw-r--r-- | gdb/config/i386/tm-symmetry.h | 582 | ||||
-rw-r--r-- | gdb/config/i386/xm-ptx.h | 76 | ||||
-rw-r--r-- | gdb/config/i386/xm-ptx4.h | 54 | ||||
-rw-r--r-- | gdb/config/i386/xm-symmetry.h | 56 | ||||
-rw-r--r-- | gdb/configure.host | 6 | ||||
-rw-r--r-- | gdb/configure.tgt | 6 | ||||
-rw-r--r-- | gdb/symm-nat.c | 1804 | ||||
-rw-r--r-- | gdb/symm-tdep.c | 204 |
20 files changed, 1784 insertions, 1758 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 24fd770..e0a42b6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,28 @@ 2003-04-09 Andrew Cagney <cagney@redhat.com> + * NEWS: Mention that the "Sequent family" is obsolete. + * configure.tgt: Obsolete i[3456]86-sequent-bsd*, + i[3456]86-sequent-sysv4*, and i[3456]86-sequent-sysv*. + * configure.host: Obsolete i[3456]86-sequent-bsd*, + i[3456]86-sequent-sysv4*, and i[3456]86-sequent-sysv*. + * config/i386/tm-ptx4.h: Obsolete file. + * config/i386/tm-ptx.h: Obsolete file. + * symm-tdep.c: Obsolete file. + * config/i386/symmetry.mt: Obsolete file. + * config/i386/tm-symmetry.h: Obsolete file. + * symm-nat.c: Obsolete file. + * config/i386/nm-symmetry.h: Obsolete file. + * config/i386/xm-symmetry.h: Obsolete file. + * config/i386/symmetry.mh: Obsolete file. + * config/i386/nm-ptx4.h: Obsolete file. + * config/i386/ptx4.mh: Obsolete file. + * config/i386/ptx.mt: Obsolete file. + * config/i386/ptx.mh: Obsolete file. + * config/i386/xm-ptx4.h: Obsolete file. + * config/i386/xm-ptx.h: Obsolete file. + +2003-04-09 Andrew Cagney <cagney@redhat.com> + Obsolete mips*-*-mach3*. * NEWS: Mention that mips*-*-mach3* is obsolete. * m3-nat.c: Obsolete file. @@ -45,6 +45,9 @@ HP/PA running BSD hppa*-*-bsd* HP/PA running OSF/1 hppa*-*-osf* HP/PA Pro target hppa*-*-pro* PMAX (MIPS) running Mach 3.0 mips*-*-mach3* +Sequent family i[3456]86-sequent-sysv4* + i[3456]86-sequent-sysv* + i[3456]86-sequent-bsd* * REMOVED configurations and files diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h index 9c8f41c..74db165 100644 --- a/gdb/config/i386/nm-ptx4.h +++ b/gdb/config/i386/nm-ptx4.h @@ -1,66 +1,66 @@ -/* Definitions to make GDB run on a Sequent Symmetry under ptx - with Weitek 1167 and i387 support. - Copyright 1986, 1987, 1989, 1992, 1994, 1996, 2000 - Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include "regcache.h" - -#include "config/nm-sysv4.h" - -#undef USE_PROC_FS - -#include "i386/nm-symmetry.h" - -#define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0) -#define PTRACE_WRITE_REGS(pid,regaddr) \ - mptrace (XPT_WREGS, (pid), (regaddr), 0) - -/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ - -#define FETCH_INFERIOR_REGISTERS - -/* We must fetch all the regs before storing, since we store all at once. */ - -#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES) - -#define CHILD_WAIT -struct target_waitstatus; -extern ptid_t child_wait (ptid_t, struct target_waitstatus *); - -/* - * ptx does attach as of ptx version 2.1. Prior to that, the interface - * exists but does not work. - * - * FIXME: Using attach/detach requires using the ptx MPDEBUGGER - * interface. There are still problems with that, so for now don't - * enable attach/detach. If you turn it on anyway, it will mostly - * work, but has a number of bugs. -fubar, 2/94. - */ -/*#define ATTACH_DETACH 1 */ -#undef ATTACH_DETACH -#define PTRACE_ATTACH XPT_DEBUG -#define PTRACE_DETACH XPT_UNDEBUG -/* - * The following drivel is needed because there are two ptrace-ish - * calls on ptx: ptrace() and mptrace(), each of which does about half - * of the ptrace functions. - */ -#define PTRACE_ATTACH_CALL(pid) ptx_do_attach(pid) -#define PTRACE_DETACH_CALL(pid, signo) ptx_do_detach(pid, signo) +// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx +// OBSOLETE with Weitek 1167 and i387 support. +// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996, 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 #include "regcache.h" +// OBSOLETE +// OBSOLETE #include "config/nm-sysv4.h" +// OBSOLETE +// OBSOLETE #undef USE_PROC_FS +// OBSOLETE +// OBSOLETE #include "i386/nm-symmetry.h" +// OBSOLETE +// OBSOLETE #define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0) +// OBSOLETE #define PTRACE_WRITE_REGS(pid,regaddr) \ +// OBSOLETE mptrace (XPT_WREGS, (pid), (regaddr), 0) +// OBSOLETE +// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ +// OBSOLETE +// OBSOLETE #define FETCH_INFERIOR_REGISTERS +// OBSOLETE +// OBSOLETE /* We must fetch all the regs before storing, since we store all at once. */ +// OBSOLETE +// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES) +// OBSOLETE +// OBSOLETE #define CHILD_WAIT +// OBSOLETE struct target_waitstatus; +// OBSOLETE extern ptid_t child_wait (ptid_t, struct target_waitstatus *); +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * ptx does attach as of ptx version 2.1. Prior to that, the interface +// OBSOLETE * exists but does not work. +// OBSOLETE * +// OBSOLETE * FIXME: Using attach/detach requires using the ptx MPDEBUGGER +// OBSOLETE * interface. There are still problems with that, so for now don't +// OBSOLETE * enable attach/detach. If you turn it on anyway, it will mostly +// OBSOLETE * work, but has a number of bugs. -fubar, 2/94. +// OBSOLETE */ +// OBSOLETE /*#define ATTACH_DETACH 1 */ +// OBSOLETE #undef ATTACH_DETACH +// OBSOLETE #define PTRACE_ATTACH XPT_DEBUG +// OBSOLETE #define PTRACE_DETACH XPT_UNDEBUG +// OBSOLETE /* +// OBSOLETE * The following drivel is needed because there are two ptrace-ish +// OBSOLETE * calls on ptx: ptrace() and mptrace(), each of which does about half +// OBSOLETE * of the ptrace functions. +// OBSOLETE */ +// OBSOLETE #define PTRACE_ATTACH_CALL(pid) ptx_do_attach(pid) +// OBSOLETE #define PTRACE_DETACH_CALL(pid, signo) ptx_do_detach(pid, signo) diff --git a/gdb/config/i386/nm-symmetry.h b/gdb/config/i386/nm-symmetry.h index d3f57e6..72b7d8d 100644 --- a/gdb/config/i386/nm-symmetry.h +++ b/gdb/config/i386/nm-symmetry.h @@ -1,50 +1,50 @@ -/* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0, - with Weitek 1167 and i387 support. - Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1998, 2000 - Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include "regcache.h" - -/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ - -#define FETCH_INFERIOR_REGISTERS - -/* We must fetch all the regs before storing, since we store all at once. */ - -#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES) - -#ifdef _SEQUENT_ -#define CHILD_WAIT -extern ptid_t child_wait (ptid_t, struct target_waitstatus *); -#endif - -/* This is the amount to subtract from u.u_ar0 - to get the offset in the core file of the register values. */ - -#ifdef _SEQUENT_ -#include <sys/param.h> -#include <sys/user.h> -#include <sys/mc_vmparam.h> -/* VA_UAREA is defined in <sys/mc_vmparam.h>, and is dependant upon - sizeof(struct user) */ -#define KERNEL_U_ADDR (VA_UAREA) /* ptx */ -#else -#define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) /* dynix */ -#endif +// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0, +// OBSOLETE with Weitek 1167 and i387 support. +// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1998, 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 #include "regcache.h" +// OBSOLETE +// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ +// OBSOLETE +// OBSOLETE #define FETCH_INFERIOR_REGISTERS +// OBSOLETE +// OBSOLETE /* We must fetch all the regs before storing, since we store all at once. */ +// OBSOLETE +// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES) +// OBSOLETE +// OBSOLETE #ifdef _SEQUENT_ +// OBSOLETE #define CHILD_WAIT +// OBSOLETE extern ptid_t child_wait (ptid_t, struct target_waitstatus *); +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE /* This is the amount to subtract from u.u_ar0 +// OBSOLETE to get the offset in the core file of the register values. */ +// OBSOLETE +// OBSOLETE #ifdef _SEQUENT_ +// OBSOLETE #include <sys/param.h> +// OBSOLETE #include <sys/user.h> +// OBSOLETE #include <sys/mc_vmparam.h> +// OBSOLETE /* VA_UAREA is defined in <sys/mc_vmparam.h>, and is dependant upon +// OBSOLETE sizeof(struct user) */ +// OBSOLETE #define KERNEL_U_ADDR (VA_UAREA) /* ptx */ +// OBSOLETE #else +// OBSOLETE #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) /* dynix */ +// OBSOLETE #endif diff --git a/gdb/config/i386/ptx.mh b/gdb/config/i386/ptx.mh index 554b411..048f5e5 100644 --- a/gdb/config/i386/ptx.mh +++ b/gdb/config/i386/ptx.mh @@ -1,7 +1,7 @@ -# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387 - -XM_FILE= xm-ptx.h -NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o -XM_CLIBS= -lPW -lseq - -NAT_FILE= nm-symmetry.h +# OBSOLETE # Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387 +# OBSOLETE +# OBSOLETE XM_FILE= xm-ptx.h +# OBSOLETE NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o +# OBSOLETE XM_CLIBS= -lPW -lseq +# OBSOLETE +# OBSOLETE NAT_FILE= nm-symmetry.h diff --git a/gdb/config/i386/ptx.mt b/gdb/config/i386/ptx.mt index 757df33..e9551e2 100644 --- a/gdb/config/i386/ptx.mt +++ b/gdb/config/i386/ptx.mt @@ -1,3 +1,3 @@ -# Target: Sequent Symmetry running ptx 2.0, with Weitek 1167 or i387. -TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o -TM_FILE= tm-ptx.h +# OBSOLETE # Target: Sequent Symmetry running ptx 2.0, with Weitek 1167 or i387. +# OBSOLETE TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o +# OBSOLETE TM_FILE= tm-ptx.h diff --git a/gdb/config/i386/ptx4.mh b/gdb/config/i386/ptx4.mh index e4aa55e..4d23635 100644 --- a/gdb/config/i386/ptx4.mh +++ b/gdb/config/i386/ptx4.mh @@ -1,8 +1,8 @@ -# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387 - -XM_FILE= xm-ptx4.h -NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o \ - core-regset.o solib.o solib-svr4.o solib-legacy.o -XM_CLIBS= -lseq - -NAT_FILE= nm-ptx4.h +# OBSOLETE # Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387 +# OBSOLETE +# OBSOLETE XM_FILE= xm-ptx4.h +# OBSOLETE NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o \ +# OBSOLETE core-regset.o solib.o solib-svr4.o solib-legacy.o +# OBSOLETE XM_CLIBS= -lseq +# OBSOLETE +# OBSOLETE NAT_FILE= nm-ptx4.h diff --git a/gdb/config/i386/ptx4.mt b/gdb/config/i386/ptx4.mt index f347809..ad268f8 100644 --- a/gdb/config/i386/ptx4.mt +++ b/gdb/config/i386/ptx4.mt @@ -1,3 +1,3 @@ -# Target: Sequent Symmetry running ptx 4.0, with Weitek 1167 or i387. -TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o -TM_FILE= tm-ptx4.h +# OBSOLETE # Target: Sequent Symmetry running ptx 4.0, with Weitek 1167 or i387. +# OBSOLETE TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o +# OBSOLETE TM_FILE= tm-ptx4.h diff --git a/gdb/config/i386/symmetry.mh b/gdb/config/i386/symmetry.mh index 486a2fb..19c5264 100644 --- a/gdb/config/i386/symmetry.mh +++ b/gdb/config/i386/symmetry.mh @@ -1,4 +1,4 @@ -# Host: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387. -XM_FILE= xm-symmetry.h -NAT_FILE= nm-symmetry.h -NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o symm-nat.o +# OBSOLETE # Host: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387. +# OBSOLETE XM_FILE= xm-symmetry.h +# OBSOLETE NAT_FILE= nm-symmetry.h +# OBSOLETE NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o symm-nat.o diff --git a/gdb/config/i386/symmetry.mt b/gdb/config/i386/symmetry.mt index a3dba70..8fccbd2 100644 --- a/gdb/config/i386/symmetry.mt +++ b/gdb/config/i386/symmetry.mt @@ -1,3 +1,3 @@ -# Target: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387. -TDEPFILES= i386-tdep.o symm-tdep.o i387-tdep.o -TM_FILE= tm-symmetry.h +# OBSOLETE # Target: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387. +# OBSOLETE TDEPFILES= i386-tdep.o symm-tdep.o i387-tdep.o +# OBSOLETE TM_FILE= tm-symmetry.h diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h index 2f2bba3..4d3ba83 100644 --- a/gdb/config/i386/tm-ptx.h +++ b/gdb/config/i386/tm-ptx.h @@ -1,194 +1,194 @@ -/* Target machine definitions for GDB on a Sequent Symmetry under ptx - with Weitek 1167 and i387 support. - - Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000, - 2003 Free Software Foundation, Inc. - - Symmetry version by Jay Vosburgh (fubar@sequent.com). - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef TM_PTX_H -#define TM_PTX_H 1 - -/* I don't know if this will work for cross-debugging, even if you do get - a copy of the right include file. */ - -#include <sys/reg.h> - -#ifdef SEQUENT_PTX4 -#include "i386/tm-i386.h" -#else /* !SEQUENT_PTX4 */ -#include "i386/tm-i386.h" -#endif - -/* Amount PC must be decremented by after a breakpoint. This is often the - number of bytes in BREAKPOINT but not always (such as now). */ - -#undef DECR_PC_AFTER_BREAK -#define DECR_PC_AFTER_BREAK 0 - -/* Number of machine registers */ - -#undef NUM_REGS -#define NUM_REGS 49 - -/* Initializer for an array of names of registers. There should be at least - NUM_REGS strings in this initializer. Any excess ones are simply ignored. - The order of the first 8 registers must match the compiler's numbering - scheme (which is the same as the 386 scheme) and also regmap in the various - *-nat.c files. */ - -#undef REGISTER_NAME -#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \ - "esp", "ebp", "esi", "edi", \ - "eip", "eflags", "st0", "st1", \ - "st2", "st3", "st4", "st5", \ - "st6", "st7", "fp1", "fp2", \ - "fp3", "fp4", "fp5", "fp6", \ - "fp7", "fp8", "fp9", "fp10", \ - "fp11", "fp12", "fp13", "fp14", \ - "fp15", "fp16", "fp17", "fp18", \ - "fp19", "fp20", "fp21", "fp22", \ - "fp23", "fp24", "fp25", "fp26", \ - "fp27", "fp28", "fp29", "fp30", \ - "fp31" } - -/* Register numbers of various important registers. - Note that some of these values are "real" register numbers, - and correspond to the general registers of the machine, - and some are "phony" register numbers which are too large - 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. */ - -#define EAX_REGNUM 0 -#define ECX_REGNUM 1 -#define EDX_REGNUM 2 -#define EBX_REGNUM 3 - -#define ESP_REGNUM 4 -#define EBP_REGNUM 5 - -#define ESI_REGNUM 6 -#define EDI_REGNUM 7 - -#define EIP_REGNUM 8 -#define EFLAGS_REGNUM 9 - -#define ST0_REGNUM 10 -#define ST1_REGNUM 11 -#define ST2_REGNUM 12 -#define ST3_REGNUM 13 - -#define ST4_REGNUM 14 -#define ST5_REGNUM 15 -#define ST6_REGNUM 16 -#define ST7_REGNUM 17 - -#define FP1_REGNUM 18 /* first 1167 register */ -/* Get %fp2 - %fp31 by addition, since they are contiguous */ - -#undef SP_REGNUM -#define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */ -#undef FP_REGNUM -#define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */ -#undef PC_REGNUM -#define PC_REGNUM EIP_REGNUM /* Contains program counter */ -#undef PS_REGNUM -#define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */ - -/* - * For ptx, this is a little bit bizarre, since the register block - * is below the u area in memory. This means that blockend here ends - * up being negative (for the call from coredep.c) since the value in - * u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us - * u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define - * FETCH_INFERIOR_REGISTERS (and supply our own functions for that), - * the core file case will be the only use of this function. - */ - -#define REGISTER_U_ADDR(addr, blockend, regno) \ -{ (addr) = ptx_register_u_addr((blockend), (regno)); } - -extern int ptx_register_u_addr (int, int); - -/* Total amount of space needed to store our copies of the machine's - register state, the array `registers'. 10 i*86 registers, 8 i387 - registers, and 31 Weitek 1167 registers */ - -#undef REGISTER_BYTES -#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4)) - -/* Largest value REGISTER_RAW_SIZE can have. */ - -#undef DEPRECATED_MAX_REGISTER_RAW_SIZE -#define DEPRECATED_MAX_REGISTER_RAW_SIZE 10 - -/* Nonzero if register N requires conversion - from raw format to virtual format. */ - -#undef REGISTER_CONVERTIBLE -#define REGISTER_CONVERTIBLE(N) \ -((N < ST0_REGNUM) ? 0 : \ - (N < FP1_REGNUM) ? 1 : \ - 0) - -/* Convert data from raw format for register REGNUM - to virtual format for register REGNUM. */ -extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */ - -#undef REGISTER_CONVERT_TO_VIRTUAL -#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ -((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \ - (REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \ - (FROM),(TO)) : \ - (void)memcpy ((TO), (FROM), 4)) - -/* Convert data from virtual format for register REGNUM - to raw format for register REGNUM. */ - -#undef REGISTER_CONVERT_TO_RAW -#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ -((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \ - (REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \ - (FROM),(TO)) : \ - (void)memcpy ((TO), (FROM), 4)) - -/* Return the GDB type object for the "standard" data type - of data in register N. */ -/* - * Note: the 1167 registers (the last line, builtin_type_float) are - * generally used in pairs, with each pair being treated as a double. - * It it also possible to use them singly as floats. I'm not sure how - * in gdb to treat the register pair pseudo-doubles. -fubar - */ -#undef REGISTER_VIRTUAL_TYPE -#define REGISTER_VIRTUAL_TYPE(N) \ -((N < ST0_REGNUM) ? builtin_type_int : \ - (N < FP1_REGNUM) ? builtin_type_double : \ - builtin_type_float) - -/* Extract from an array REGBUF containing the (raw) register state - a function return value of type TYPE, and copy that, in virtual format, - into VALBUF. */ - -#undef DEPRECATED_EXTRACT_RETURN_VALUE -#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ - symmetry_extract_return_value(TYPE, REGBUF, VALBUF) - -#endif /* ifndef TM_PTX_H */ +// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx +// OBSOLETE with Weitek 1167 and i387 support. +// OBSOLETE +// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000, +// OBSOLETE 2003 Free Software Foundation, Inc. +// OBSOLETE +// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com). +// 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 #ifndef TM_PTX_H +// OBSOLETE #define TM_PTX_H 1 +// OBSOLETE +// OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get +// OBSOLETE a copy of the right include file. */ +// OBSOLETE +// OBSOLETE #include <sys/reg.h> +// OBSOLETE +// OBSOLETE #ifdef SEQUENT_PTX4 +// OBSOLETE #include "i386/tm-i386.h" +// OBSOLETE #else /* !SEQUENT_PTX4 */ +// OBSOLETE #include "i386/tm-i386.h" +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the +// OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */ +// OBSOLETE +// OBSOLETE #undef DECR_PC_AFTER_BREAK +// OBSOLETE #define DECR_PC_AFTER_BREAK 0 +// OBSOLETE +// OBSOLETE /* Number of machine registers */ +// OBSOLETE +// OBSOLETE #undef NUM_REGS +// OBSOLETE #define NUM_REGS 49 +// OBSOLETE +// OBSOLETE /* Initializer for an array of names of registers. There should be at least +// OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored. +// OBSOLETE The order of the first 8 registers must match the compiler's numbering +// OBSOLETE scheme (which is the same as the 386 scheme) and also regmap in the various +// OBSOLETE *-nat.c files. */ +// OBSOLETE +// OBSOLETE #undef REGISTER_NAME +// OBSOLETE #define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \ +// OBSOLETE "esp", "ebp", "esi", "edi", \ +// OBSOLETE "eip", "eflags", "st0", "st1", \ +// OBSOLETE "st2", "st3", "st4", "st5", \ +// OBSOLETE "st6", "st7", "fp1", "fp2", \ +// OBSOLETE "fp3", "fp4", "fp5", "fp6", \ +// OBSOLETE "fp7", "fp8", "fp9", "fp10", \ +// OBSOLETE "fp11", "fp12", "fp13", "fp14", \ +// OBSOLETE "fp15", "fp16", "fp17", "fp18", \ +// OBSOLETE "fp19", "fp20", "fp21", "fp22", \ +// OBSOLETE "fp23", "fp24", "fp25", "fp26", \ +// OBSOLETE "fp27", "fp28", "fp29", "fp30", \ +// OBSOLETE "fp31" } +// 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 #define EAX_REGNUM 0 +// OBSOLETE #define ECX_REGNUM 1 +// OBSOLETE #define EDX_REGNUM 2 +// OBSOLETE #define EBX_REGNUM 3 +// OBSOLETE +// OBSOLETE #define ESP_REGNUM 4 +// OBSOLETE #define EBP_REGNUM 5 +// OBSOLETE +// OBSOLETE #define ESI_REGNUM 6 +// OBSOLETE #define EDI_REGNUM 7 +// OBSOLETE +// OBSOLETE #define EIP_REGNUM 8 +// OBSOLETE #define EFLAGS_REGNUM 9 +// OBSOLETE +// OBSOLETE #define ST0_REGNUM 10 +// OBSOLETE #define ST1_REGNUM 11 +// OBSOLETE #define ST2_REGNUM 12 +// OBSOLETE #define ST3_REGNUM 13 +// OBSOLETE +// OBSOLETE #define ST4_REGNUM 14 +// OBSOLETE #define ST5_REGNUM 15 +// OBSOLETE #define ST6_REGNUM 16 +// OBSOLETE #define ST7_REGNUM 17 +// OBSOLETE +// OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */ +// OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */ +// OBSOLETE +// OBSOLETE #undef SP_REGNUM +// OBSOLETE #define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */ +// OBSOLETE #undef FP_REGNUM +// OBSOLETE #define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */ +// OBSOLETE #undef PC_REGNUM +// OBSOLETE #define PC_REGNUM EIP_REGNUM /* Contains program counter */ +// OBSOLETE #undef PS_REGNUM +// OBSOLETE #define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */ +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * For ptx, this is a little bit bizarre, since the register block +// OBSOLETE * is below the u area in memory. This means that blockend here ends +// OBSOLETE * up being negative (for the call from coredep.c) since the value in +// OBSOLETE * u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us +// OBSOLETE * u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define +// OBSOLETE * FETCH_INFERIOR_REGISTERS (and supply our own functions for that), +// OBSOLETE * the core file case will be the only use of this function. +// OBSOLETE */ +// OBSOLETE +// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ +// OBSOLETE { (addr) = ptx_register_u_addr((blockend), (regno)); } +// OBSOLETE +// OBSOLETE extern int ptx_register_u_addr (int, int); +// OBSOLETE +// OBSOLETE /* Total amount of space needed to store our copies of the machine's +// OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387 +// OBSOLETE registers, and 31 Weitek 1167 registers */ +// OBSOLETE +// OBSOLETE #undef REGISTER_BYTES +// OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4)) +// OBSOLETE +// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */ +// OBSOLETE +// OBSOLETE #undef DEPRECATED_MAX_REGISTER_RAW_SIZE +// OBSOLETE #define DEPRECATED_MAX_REGISTER_RAW_SIZE 10 +// 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) \ +// OBSOLETE ((N < ST0_REGNUM) ? 0 : \ +// OBSOLETE (N < FP1_REGNUM) ? 1 : \ +// OBSOLETE 0) +// OBSOLETE +// OBSOLETE /* Convert data from raw format for register REGNUM +// OBSOLETE to virtual format for register REGNUM. */ +// OBSOLETE extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */ +// OBSOLETE +// OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL +// OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ +// OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \ +// OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \ +// OBSOLETE (FROM),(TO)) : \ +// OBSOLETE (void)memcpy ((TO), (FROM), 4)) +// OBSOLETE +// OBSOLETE /* Convert data from virtual format for register REGNUM +// OBSOLETE to raw format for register REGNUM. */ +// OBSOLETE +// OBSOLETE #undef REGISTER_CONVERT_TO_RAW +// OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ +// OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \ +// OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \ +// OBSOLETE (FROM),(TO)) : \ +// OBSOLETE (void)memcpy ((TO), (FROM), 4)) +// OBSOLETE +// OBSOLETE /* Return the GDB type object for the "standard" data type +// OBSOLETE of data in register N. */ +// OBSOLETE /* +// OBSOLETE * Note: the 1167 registers (the last line, builtin_type_float) are +// OBSOLETE * generally used in pairs, with each pair being treated as a double. +// OBSOLETE * It it also possible to use them singly as floats. I'm not sure how +// OBSOLETE * in gdb to treat the register pair pseudo-doubles. -fubar +// OBSOLETE */ +// OBSOLETE #undef REGISTER_VIRTUAL_TYPE +// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ +// OBSOLETE ((N < ST0_REGNUM) ? builtin_type_int : \ +// OBSOLETE (N < FP1_REGNUM) ? builtin_type_double : \ +// OBSOLETE builtin_type_float) +// 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 DEPRECATED_EXTRACT_RETURN_VALUE +// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +// OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF) +// OBSOLETE +// OBSOLETE #endif /* ifndef TM_PTX_H */ diff --git a/gdb/config/i386/tm-ptx4.h b/gdb/config/i386/tm-ptx4.h index a13d4a6..5f83db4 100644 --- a/gdb/config/i386/tm-ptx4.h +++ b/gdb/config/i386/tm-ptx4.h @@ -1,26 +1,26 @@ -/* Target machine definitions for GDB on a Sequent Symmetry under ptx - with Weitek 1167 and i387 support. - Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994 - Free Software Foundation, Inc. - Symmetry version by Jay Vosburgh (fubar@sequent.com). - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define SEQUENT_PTX4 - -#include "i386/tm-ptx.h" +// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx +// OBSOLETE with Weitek 1167 and i387 support. +// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994 +// OBSOLETE Free Software Foundation, Inc. +// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com). +// 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 SEQUENT_PTX4 +// OBSOLETE +// OBSOLETE #include "i386/tm-ptx.h" diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h index 2825562..c8680a3 100644 --- a/gdb/config/i386/tm-symmetry.h +++ b/gdb/config/i386/tm-symmetry.h @@ -1,291 +1,291 @@ -/* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0, - with Weitek 1167 and i387 support. - - Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2003 Free - Software Foundation, Inc. - - Symmetry version by Jay Vosburgh (fubar@sequent.com). - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef TM_SYMMETRY_H -#define TM_SYMMETRY_H 1 - -#include "regcache.h" -#include "doublest.h" - -/* I don't know if this will work for cross-debugging, even if you do get - a copy of the right include file. */ -#include <machine/reg.h> - -#include "i386/tm-i386.h" - -/* Amount PC must be decremented by after a breakpoint. This is often the - number of bytes in BREAKPOINT but not always (such as now). */ - -#undef DECR_PC_AFTER_BREAK -#define DECR_PC_AFTER_BREAK 0 - -/* Number of machine registers */ - -#undef NUM_REGS -#define NUM_REGS 49 - -/* Initializer for an array of names of registers. - There should be NUM_REGS strings in this initializer. */ - -/* Initializer for an array of names of registers. There should be at least - NUM_REGS strings in this initializer. Any excess ones are simply ignored. - Symmetry registers are in this weird order to match the register numbers - in the symbol table entries. If you change the order, things will probably - break mysteriously for no apparent reason. Also note that the st(0)... - st(7) 387 registers are represented as st0...st7. */ - -#undef REGISTER_NAME -#define REGISTER_NAMES { "eax", "edx", "ecx", "st0", "st1", \ - "ebx", "esi", "edi", "st2", "st3", \ - "st4", "st5", "st6", "st7", "esp", \ - "ebp", "eip", "eflags","fp1", "fp2", \ - "fp3", "fp4", "fp5", "fp6", "fp7", \ - "fp8", "fp9", "fp10", "fp11", "fp12", \ - "fp13", "fp14", "fp15", "fp16", "fp17", \ - "fp18", "fp19", "fp20", "fp21", "fp22", \ - "fp23", "fp24", "fp25", "fp26", "fp27", \ - "fp28", "fp29", "fp30", "fp31" } - -/* Register numbers of various important registers. - Note that some of these values are "real" register numbers, - and correspond to the general registers of the machine, - and some are "phony" register numbers which are too large - 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. */ - -#define EAX_REGNUM 0 -#define EDX_REGNUM 1 -#define ECX_REGNUM 2 -#define ST0_REGNUM 3 -#define ST1_REGNUM 4 -#define EBX_REGNUM 5 -#define ESI_REGNUM 6 -#define EDI_REGNUM 7 -#define ST2_REGNUM 8 -#define ST3_REGNUM 9 - -#define ST4_REGNUM 10 -#define ST5_REGNUM 11 -#define ST6_REGNUM 12 -#define ST7_REGNUM 13 - -#define FP1_REGNUM 18 /* first 1167 register */ -/* Get %fp2 - %fp31 by addition, since they are contiguous */ - -#undef SP_REGNUM -#define SP_REGNUM 14 /* (usp) Contains address of top of stack */ -#define ESP_REGNUM 14 -#undef FP_REGNUM -#define FP_REGNUM 15 /* (ebp) Contains address of executing stack frame */ -#define EBP_REGNUM 15 -#undef PC_REGNUM -#define PC_REGNUM 16 /* (eip) Contains program counter */ -#define EIP_REGNUM 16 -#undef PS_REGNUM -#define PS_REGNUM 17 /* (ps) Contains processor status */ -#define EFLAGS_REGNUM 17 - -/* - * Following macro translates i386 opcode register numbers to Symmetry - * register numbers. This is used by i386_frame_find_saved_regs. - * - * %eax %ecx %edx %ebx %esp %ebp %esi %edi - * i386 0 1 2 3 4 5 6 7 - * Symmetry 0 2 1 5 14 15 6 7 - * - */ -#define I386_REGNO_TO_SYMMETRY(n) \ -((n)==0?0 :(n)==1?2 :(n)==2?1 :(n)==3?5 :(n)==4?14 :(n)==5?15 :(n)) - -/* The magic numbers below are offsets into u_ar0 in the user struct. - * They live in <machine/reg.h>. Gdb calls this macro with blockend - * holding u.u_ar0 - KERNEL_U_ADDR. Only the registers listed are - * saved in the u area (along with a few others that aren't useful - * here. See <machine/reg.h>). - */ - -#define REGISTER_U_ADDR(addr, blockend, regno) \ -{ struct user foo; /* needed for finding fpu regs */ \ -switch (regno) { \ - case 0: \ - addr = blockend + EAX * sizeof(int); break; \ - case 1: \ - addr = blockend + EDX * sizeof(int); break; \ - case 2: \ - addr = blockend + ECX * sizeof(int); break; \ - case 3: /* st(0) */ \ - addr = ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \ - break; \ - case 4: /* st(1) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[1][0] - (int)&foo); \ - break; \ - case 5: \ - addr = blockend + EBX * sizeof(int); break; \ - case 6: \ - addr = blockend + ESI * sizeof(int); break; \ - case 7: \ - addr = blockend + EDI * sizeof(int); break; \ - case 8: /* st(2) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \ - break; \ - case 9: /* st(3) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \ - break; \ - case 10: /* st(4) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \ - break; \ - case 11: /* st(5) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \ - break; \ - case 12: /* st(6) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \ - break; \ - case 13: /* st(7) */ \ - addr = ((int) &foo.u_fpusave.fpu_stack[7][0] - (int)&foo); \ - break; \ - case 14: \ - addr = blockend + ESP * sizeof(int); break; \ - case 15: \ - addr = blockend + EBP * sizeof(int); break; \ - case 16: \ - addr = blockend + EIP * sizeof(int); break; \ - case 17: \ - addr = blockend + FLAGS * sizeof(int); break; \ - case 18: /* fp1 */ \ - case 19: /* fp2 */ \ - case 20: /* fp3 */ \ - case 21: /* fp4 */ \ - case 22: /* fp5 */ \ - case 23: /* fp6 */ \ - case 24: /* fp7 */ \ - case 25: /* fp8 */ \ - case 26: /* fp9 */ \ - case 27: /* fp10 */ \ - case 28: /* fp11 */ \ - case 29: /* fp12 */ \ - case 30: /* fp13 */ \ - case 31: /* fp14 */ \ - case 32: /* fp15 */ \ - case 33: /* fp16 */ \ - case 34: /* fp17 */ \ - case 35: /* fp18 */ \ - case 36: /* fp19 */ \ - case 37: /* fp20 */ \ - case 38: /* fp21 */ \ - case 39: /* fp22 */ \ - case 40: /* fp23 */ \ - case 41: /* fp24 */ \ - case 42: /* fp25 */ \ - case 43: /* fp26 */ \ - case 44: /* fp27 */ \ - case 45: /* fp28 */ \ - case 46: /* fp29 */ \ - case 47: /* fp30 */ \ - case 48: /* fp31 */ \ - addr = ((int) &foo.u_fpasave.fpa_regs[(regno)-18] - (int)&foo); \ - } \ -} - -/* Total amount of space needed to store our copies of the machine's - register state, the array `registers'. 10 i*86 registers, 8 i387 - registers, and 31 Weitek 1167 registers */ - -#undef REGISTER_BYTES -#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4)) - -/* Nonzero if register N requires conversion - from raw format to virtual format. */ - -#undef REGISTER_CONVERTIBLE -#define REGISTER_CONVERTIBLE(N) \ -(((N) < 3) ? 0 : \ -((N) < 5) ? 1 : \ -((N) < 8) ? 0 : \ -((N) < 14) ? 1 : \ - 0) - -#include "floatformat.h" - -/* Convert data from raw format for register REGNUM in buffer FROM - to virtual format with type TYPE in buffer TO. */ - -#undef REGISTER_CONVERT_TO_VIRTUAL -#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ -{ \ - DOUBLEST val; \ - floatformat_to_doublest (&floatformat_i387_ext, (FROM), &val); \ - deprecated_store_floating ((TO), TYPE_LENGTH (TYPE), val); \ -} - -/* Convert data from virtual format with type TYPE in buffer FROM - to raw format for register REGNUM in buffer TO. */ - -#undef REGISTER_CONVERT_TO_RAW -#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ -{ \ - DOUBLEST val = deprecated_extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ - floatformat_from_doublest (&floatformat_i387_ext, &val, (TO)); \ -} - -/* Return the GDB type object for the "standard" data type - of data in register N. */ - -#undef REGISTER_VIRTUAL_TYPE -#define REGISTER_VIRTUAL_TYPE(N) \ -((N < 3) ? builtin_type_int : \ -(N < 5) ? builtin_type_double : \ -(N < 8) ? builtin_type_int : \ -(N < 14) ? builtin_type_double : \ - builtin_type_int) - -/* Store the address of the place in which to copy the structure the - subroutine will return. This is called from call_function. - Native cc passes the address in eax, gcc (up to version 2.5.8) - passes it on the stack. gcc should be fixed in future versions to - adopt native cc conventions. */ - -#undef DEPRECATED_PUSH_ARGUMENTS -#undef STORE_STRUCT_RETURN -#define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR)) - -/* Extract from an array REGBUF containing the (raw) register state - a function return value of type TYPE, and copy that, in virtual format, - into VALBUF. */ - -#undef DEPRECATED_EXTRACT_RETURN_VALUE -#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ - symmetry_extract_return_value(TYPE, REGBUF, VALBUF) - -/* The following redefines make backtracing through sigtramp work. - They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp - from the sigcontext structure which is pushed by the kernel on the - user stack, along with a pointer to it. */ - -#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", name)) - -/* Offset to saved PC in sigcontext, from <signal.h>. */ -#define SIGCONTEXT_PC_OFFSET 16 - -#endif /* ifndef TM_SYMMETRY_H */ +// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0, +// OBSOLETE with Weitek 1167 and i387 support. +// OBSOLETE +// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2003 Free +// OBSOLETE Software Foundation, Inc. +// OBSOLETE +// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com). +// 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 #ifndef TM_SYMMETRY_H +// OBSOLETE #define TM_SYMMETRY_H 1 +// OBSOLETE +// OBSOLETE #include "regcache.h" +// OBSOLETE #include "doublest.h" +// OBSOLETE +// OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get +// OBSOLETE a copy of the right include file. */ +// OBSOLETE #include <machine/reg.h> +// OBSOLETE +// OBSOLETE #include "i386/tm-i386.h" +// OBSOLETE +// OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the +// OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */ +// OBSOLETE +// OBSOLETE #undef DECR_PC_AFTER_BREAK +// OBSOLETE #define DECR_PC_AFTER_BREAK 0 +// OBSOLETE +// OBSOLETE /* Number of machine registers */ +// OBSOLETE +// OBSOLETE #undef NUM_REGS +// OBSOLETE #define NUM_REGS 49 +// OBSOLETE +// OBSOLETE /* Initializer for an array of names of registers. +// OBSOLETE There should be NUM_REGS strings in this initializer. */ +// OBSOLETE +// OBSOLETE /* Initializer for an array of names of registers. There should be at least +// OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored. +// OBSOLETE Symmetry registers are in this weird order to match the register numbers +// OBSOLETE in the symbol table entries. If you change the order, things will probably +// OBSOLETE break mysteriously for no apparent reason. Also note that the st(0)... +// OBSOLETE st(7) 387 registers are represented as st0...st7. */ +// OBSOLETE +// OBSOLETE #undef REGISTER_NAME +// OBSOLETE #define REGISTER_NAMES { "eax", "edx", "ecx", "st0", "st1", \ +// OBSOLETE "ebx", "esi", "edi", "st2", "st3", \ +// OBSOLETE "st4", "st5", "st6", "st7", "esp", \ +// OBSOLETE "ebp", "eip", "eflags","fp1", "fp2", \ +// OBSOLETE "fp3", "fp4", "fp5", "fp6", "fp7", \ +// OBSOLETE "fp8", "fp9", "fp10", "fp11", "fp12", \ +// OBSOLETE "fp13", "fp14", "fp15", "fp16", "fp17", \ +// OBSOLETE "fp18", "fp19", "fp20", "fp21", "fp22", \ +// OBSOLETE "fp23", "fp24", "fp25", "fp26", "fp27", \ +// OBSOLETE "fp28", "fp29", "fp30", "fp31" } +// 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 #define EAX_REGNUM 0 +// OBSOLETE #define EDX_REGNUM 1 +// OBSOLETE #define ECX_REGNUM 2 +// OBSOLETE #define ST0_REGNUM 3 +// OBSOLETE #define ST1_REGNUM 4 +// OBSOLETE #define EBX_REGNUM 5 +// OBSOLETE #define ESI_REGNUM 6 +// OBSOLETE #define EDI_REGNUM 7 +// OBSOLETE #define ST2_REGNUM 8 +// OBSOLETE #define ST3_REGNUM 9 +// OBSOLETE +// OBSOLETE #define ST4_REGNUM 10 +// OBSOLETE #define ST5_REGNUM 11 +// OBSOLETE #define ST6_REGNUM 12 +// OBSOLETE #define ST7_REGNUM 13 +// OBSOLETE +// OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */ +// OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */ +// OBSOLETE +// OBSOLETE #undef SP_REGNUM +// OBSOLETE #define SP_REGNUM 14 /* (usp) Contains address of top of stack */ +// OBSOLETE #define ESP_REGNUM 14 +// OBSOLETE #undef FP_REGNUM +// OBSOLETE #define FP_REGNUM 15 /* (ebp) Contains address of executing stack frame */ +// OBSOLETE #define EBP_REGNUM 15 +// OBSOLETE #undef PC_REGNUM +// OBSOLETE #define PC_REGNUM 16 /* (eip) Contains program counter */ +// OBSOLETE #define EIP_REGNUM 16 +// OBSOLETE #undef PS_REGNUM +// OBSOLETE #define PS_REGNUM 17 /* (ps) Contains processor status */ +// OBSOLETE #define EFLAGS_REGNUM 17 +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * Following macro translates i386 opcode register numbers to Symmetry +// OBSOLETE * register numbers. This is used by i386_frame_find_saved_regs. +// OBSOLETE * +// OBSOLETE * %eax %ecx %edx %ebx %esp %ebp %esi %edi +// OBSOLETE * i386 0 1 2 3 4 5 6 7 +// OBSOLETE * Symmetry 0 2 1 5 14 15 6 7 +// OBSOLETE * +// OBSOLETE */ +// OBSOLETE #define I386_REGNO_TO_SYMMETRY(n) \ +// OBSOLETE ((n)==0?0 :(n)==1?2 :(n)==2?1 :(n)==3?5 :(n)==4?14 :(n)==5?15 :(n)) +// OBSOLETE +// OBSOLETE /* The magic numbers below are offsets into u_ar0 in the user struct. +// OBSOLETE * They live in <machine/reg.h>. Gdb calls this macro with blockend +// OBSOLETE * holding u.u_ar0 - KERNEL_U_ADDR. Only the registers listed are +// OBSOLETE * saved in the u area (along with a few others that aren't useful +// OBSOLETE * here. See <machine/reg.h>). +// OBSOLETE */ +// OBSOLETE +// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ +// OBSOLETE { struct user foo; /* needed for finding fpu regs */ \ +// OBSOLETE switch (regno) { \ +// OBSOLETE case 0: \ +// OBSOLETE addr = blockend + EAX * sizeof(int); break; \ +// OBSOLETE case 1: \ +// OBSOLETE addr = blockend + EDX * sizeof(int); break; \ +// OBSOLETE case 2: \ +// OBSOLETE addr = blockend + ECX * sizeof(int); break; \ +// OBSOLETE case 3: /* st(0) */ \ +// OBSOLETE addr = ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 4: /* st(1) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[1][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 5: \ +// OBSOLETE addr = blockend + EBX * sizeof(int); break; \ +// OBSOLETE case 6: \ +// OBSOLETE addr = blockend + ESI * sizeof(int); break; \ +// OBSOLETE case 7: \ +// OBSOLETE addr = blockend + EDI * sizeof(int); break; \ +// OBSOLETE case 8: /* st(2) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 9: /* st(3) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 10: /* st(4) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 11: /* st(5) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 12: /* st(6) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 13: /* st(7) */ \ +// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[7][0] - (int)&foo); \ +// OBSOLETE break; \ +// OBSOLETE case 14: \ +// OBSOLETE addr = blockend + ESP * sizeof(int); break; \ +// OBSOLETE case 15: \ +// OBSOLETE addr = blockend + EBP * sizeof(int); break; \ +// OBSOLETE case 16: \ +// OBSOLETE addr = blockend + EIP * sizeof(int); break; \ +// OBSOLETE case 17: \ +// OBSOLETE addr = blockend + FLAGS * sizeof(int); break; \ +// OBSOLETE case 18: /* fp1 */ \ +// OBSOLETE case 19: /* fp2 */ \ +// OBSOLETE case 20: /* fp3 */ \ +// OBSOLETE case 21: /* fp4 */ \ +// OBSOLETE case 22: /* fp5 */ \ +// OBSOLETE case 23: /* fp6 */ \ +// OBSOLETE case 24: /* fp7 */ \ +// OBSOLETE case 25: /* fp8 */ \ +// OBSOLETE case 26: /* fp9 */ \ +// OBSOLETE case 27: /* fp10 */ \ +// OBSOLETE case 28: /* fp11 */ \ +// OBSOLETE case 29: /* fp12 */ \ +// OBSOLETE case 30: /* fp13 */ \ +// OBSOLETE case 31: /* fp14 */ \ +// OBSOLETE case 32: /* fp15 */ \ +// OBSOLETE case 33: /* fp16 */ \ +// OBSOLETE case 34: /* fp17 */ \ +// OBSOLETE case 35: /* fp18 */ \ +// OBSOLETE case 36: /* fp19 */ \ +// OBSOLETE case 37: /* fp20 */ \ +// OBSOLETE case 38: /* fp21 */ \ +// OBSOLETE case 39: /* fp22 */ \ +// OBSOLETE case 40: /* fp23 */ \ +// OBSOLETE case 41: /* fp24 */ \ +// OBSOLETE case 42: /* fp25 */ \ +// OBSOLETE case 43: /* fp26 */ \ +// OBSOLETE case 44: /* fp27 */ \ +// OBSOLETE case 45: /* fp28 */ \ +// OBSOLETE case 46: /* fp29 */ \ +// OBSOLETE case 47: /* fp30 */ \ +// OBSOLETE case 48: /* fp31 */ \ +// OBSOLETE addr = ((int) &foo.u_fpasave.fpa_regs[(regno)-18] - (int)&foo); \ +// OBSOLETE } \ +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Total amount of space needed to store our copies of the machine's +// OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387 +// OBSOLETE registers, and 31 Weitek 1167 registers */ +// OBSOLETE +// OBSOLETE #undef REGISTER_BYTES +// OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 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) \ +// OBSOLETE (((N) < 3) ? 0 : \ +// OBSOLETE ((N) < 5) ? 1 : \ +// OBSOLETE ((N) < 8) ? 0 : \ +// OBSOLETE ((N) < 14) ? 1 : \ +// OBSOLETE 0) +// OBSOLETE +// OBSOLETE #include "floatformat.h" +// 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 DOUBLEST val; \ +// OBSOLETE floatformat_to_doublest (&floatformat_i387_ext, (FROM), &val); \ +// OBSOLETE deprecated_store_floating ((TO), TYPE_LENGTH (TYPE), val); \ +// OBSOLETE } +// 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 DOUBLEST val = deprecated_extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ +// OBSOLETE floatformat_from_doublest (&floatformat_i387_ext, &val, (TO)); \ +// OBSOLETE } +// 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 ((N < 3) ? builtin_type_int : \ +// OBSOLETE (N < 5) ? builtin_type_double : \ +// OBSOLETE (N < 8) ? builtin_type_int : \ +// OBSOLETE (N < 14) ? builtin_type_double : \ +// OBSOLETE builtin_type_int) +// OBSOLETE +// OBSOLETE /* Store the address of the place in which to copy the structure the +// OBSOLETE subroutine will return. This is called from call_function. +// OBSOLETE Native cc passes the address in eax, gcc (up to version 2.5.8) +// OBSOLETE passes it on the stack. gcc should be fixed in future versions to +// OBSOLETE adopt native cc conventions. */ +// OBSOLETE +// OBSOLETE #undef DEPRECATED_PUSH_ARGUMENTS +// OBSOLETE #undef STORE_STRUCT_RETURN +// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR)) +// 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 DEPRECATED_EXTRACT_RETURN_VALUE +// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +// OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF) +// OBSOLETE +// OBSOLETE /* The following redefines make backtracing through sigtramp work. +// OBSOLETE They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp +// OBSOLETE from the sigcontext structure which is pushed by the kernel on the +// OBSOLETE user stack, along with a pointer to it. */ +// OBSOLETE +// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", name)) +// OBSOLETE +// OBSOLETE /* Offset to saved PC in sigcontext, from <signal.h>. */ +// OBSOLETE #define SIGCONTEXT_PC_OFFSET 16 +// OBSOLETE +// OBSOLETE #endif /* ifndef TM_SYMMETRY_H */ diff --git a/gdb/config/i386/xm-ptx.h b/gdb/config/i386/xm-ptx.h index 8987f29..1ecae0c 100644 --- a/gdb/config/i386/xm-ptx.h +++ b/gdb/config/i386/xm-ptx.h @@ -1,38 +1,38 @@ -/* Definitions to make GDB run on a Sequent Symmetry under ptx, with - Weitek 1167 and i387 support. - Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995 - Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */ - -#ifdef _SEQUENT_PTX4_ -#include "config/xm-sysv4.h" -#endif /* _SEQUENT_PTX4_ */ - -/* This machine doesn't have the siginterrupt call. */ -#define NO_SIGINTERRUPT - -#define HAVE_WAIT_STRUCT - -#undef HAVE_TERMIO -#define HAVE_TERMIOS -#define USG - -#define USE_O_NOCTTY +// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx, with +// OBSOLETE Weitek 1167 and i387 support. +// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995 +// 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 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */ +// OBSOLETE +// OBSOLETE #ifdef _SEQUENT_PTX4_ +// OBSOLETE #include "config/xm-sysv4.h" +// OBSOLETE #endif /* _SEQUENT_PTX4_ */ +// OBSOLETE +// OBSOLETE /* This machine doesn't have the siginterrupt call. */ +// OBSOLETE #define NO_SIGINTERRUPT +// OBSOLETE +// OBSOLETE #define HAVE_WAIT_STRUCT +// OBSOLETE +// OBSOLETE #undef HAVE_TERMIO +// OBSOLETE #define HAVE_TERMIOS +// OBSOLETE #define USG +// OBSOLETE +// OBSOLETE #define USE_O_NOCTTY diff --git a/gdb/config/i386/xm-ptx4.h b/gdb/config/i386/xm-ptx4.h index 6059413..7f0605d 100644 --- a/gdb/config/i386/xm-ptx4.h +++ b/gdb/config/i386/xm-ptx4.h @@ -1,27 +1,27 @@ -/* Definitions to make GDB run on a Sequent Symmetry under ptx, with - Weitek 1167 and i387 support. - Copyright 1986, 1987, 1989, 1992, 1993, 1994 - Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */ - -#include "config/xm-sysv4.h" - -#include "i386/xm-ptx.h" +// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx, with +// OBSOLETE Weitek 1167 and i387 support. +// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994 +// 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 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */ +// OBSOLETE +// OBSOLETE #include "config/xm-sysv4.h" +// OBSOLETE +// OBSOLETE #include "i386/xm-ptx.h" diff --git a/gdb/config/i386/xm-symmetry.h b/gdb/config/i386/xm-symmetry.h index 781a343..27711f2 100644 --- a/gdb/config/i386/xm-symmetry.h +++ b/gdb/config/i386/xm-symmetry.h @@ -1,28 +1,28 @@ -/* Definitions to make GDB run on a Sequent Symmetry under - dynix 3.1, with Weitek 1167 and i387 support. - Copyright 1986, 1987, 1989, 1992, 1993, 1994 - Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */ - -/* This machine doesn't have the siginterrupt call. */ -#define NO_SIGINTERRUPT - -#define HAVE_WAIT_STRUCT +// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under +// OBSOLETE dynix 3.1, with Weitek 1167 and i387 support. +// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994 +// 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 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */ +// OBSOLETE +// OBSOLETE /* This machine doesn't have the siginterrupt call. */ +// OBSOLETE #define NO_SIGINTERRUPT +// OBSOLETE +// OBSOLETE #define HAVE_WAIT_STRUCT diff --git a/gdb/configure.host b/gdb/configure.host index 40786cb..8f96b0a 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -49,9 +49,9 @@ hppa*-*-hpux*) gdb_host=hppahpux ;; # OBSOLETE hppa*-*-osf*) gdb_host=hppaosf ;; i[3456]86-ncr-*) gdb_host=ncr3000 ;; -i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix -i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;; -i[3456]86-sequent-sysv*) gdb_host=ptx ;; +# OBSOLETE i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix +# OBSOLETE i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;; +# OBSOLETE i[3456]86-sequent-sysv*) gdb_host=ptx ;; i[3456]86-*-bsd*) gdb_host=i386bsd ;; i[3456]86-*-dgux*) gdb_host=i386v4 ;; i[3456]86-*-freebsd*) gdb_host=fbsd ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 092192f..df174a7 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -81,9 +81,9 @@ hppa*-*-hiux*) gdb_target=hppahpux ;; # OBSOLETE hppa*-*-osf*) gdb_target=hppaosf ;; hppa*-*-*) gdb_target=hppa ;; -i[3456]86-sequent-bsd*) gdb_target=symmetry ;; -i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;; -i[3456]86-sequent-sysv*) gdb_target=ptx ;; +# OBSOLETE i[3456]86-sequent-bsd*) gdb_target=symmetry ;; +# OBSOLETE i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;; +# OBSOLETE i[3456]86-sequent-sysv*) gdb_target=ptx ;; i[3456]86-ncr-*) gdb_target=ncr3000 ;; i[3456]86-*-bsd*) gdb_target=i386bsd ;; i[3456]86-*-netbsd*) gdb_target=nbsd ;; diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c index 79caf5a..c4b2c9a 100644 --- a/gdb/symm-nat.c +++ b/gdb/symm-nat.c @@ -1,902 +1,902 @@ -/* Sequent Symmetry host interface, for GDB when running under Unix. - - Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1999, - 2000, 2001, 2003 Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* FIXME, some 387-specific items of use taken from i387-tdep.c -- ought to be - merged back in. */ - -#include "defs.h" -#include "frame.h" -#include "inferior.h" -#include "symtab.h" -#include "target.h" -#include "regcache.h" - -/* FIXME: What is the _INKERNEL define for? */ -#define _INKERNEL -#include <signal.h> -#undef _INKERNEL -#include "gdb_wait.h" -#include <sys/param.h> -#include <sys/user.h> -#include <sys/proc.h> -#include <sys/dir.h> -#include <sys/ioctl.h> -#include "gdb_stat.h" -#ifdef _SEQUENT_ -#include <sys/ptrace.h> -#else -/* Dynix has only machine/ptrace.h, which is already included by sys/user.h */ -/* Dynix has no mptrace call */ -#define mptrace ptrace -#endif -#include "gdbcore.h" -#include <fcntl.h> -#include <sgtty.h> -#define TERMINAL struct sgttyb - -#include "gdbcore.h" - -void -store_inferior_registers (int regno) -{ - struct pt_regset regs; - int i; - - /* FIXME: Fetching the registers is a kludge to initialize all elements - in the fpu and fpa status. This works for normal debugging, but - might cause problems when calling functions in the inferior. - At least fpu_control and fpa_pcr (probably more) should be added - to the registers array to solve this properly. */ - mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0); - - regs.pr_eax = *(int *) &deprecated_registers[REGISTER_BYTE (0)]; - regs.pr_ebx = *(int *) &deprecated_registers[REGISTER_BYTE (5)]; - regs.pr_ecx = *(int *) &deprecated_registers[REGISTER_BYTE (2)]; - regs.pr_edx = *(int *) &deprecated_registers[REGISTER_BYTE (1)]; - regs.pr_esi = *(int *) &deprecated_registers[REGISTER_BYTE (6)]; - regs.pr_edi = *(int *) &deprecated_registers[REGISTER_BYTE (7)]; - regs.pr_esp = *(int *) &deprecated_registers[REGISTER_BYTE (14)]; - regs.pr_ebp = *(int *) &deprecated_registers[REGISTER_BYTE (15)]; - regs.pr_eip = *(int *) &deprecated_registers[REGISTER_BYTE (16)]; - regs.pr_flags = *(int *) &deprecated_registers[REGISTER_BYTE (17)]; - for (i = 0; i < 31; i++) - { - regs.pr_fpa.fpa_regs[i] = - *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)]; - } - memcpy (regs.pr_fpu.fpu_stack[0], &deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[1], &deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[2], &deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[3], &deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[4], &deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[5], &deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[6], &deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], 10); - memcpy (regs.pr_fpu.fpu_stack[7], &deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], 10); - mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0); -} - -void -fetch_inferior_registers (int regno) -{ - int i; - struct pt_regset regs; - - deprecated_registers_fetched (); - - mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0); - *(int *) &deprecated_registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax; - *(int *) &rdeprecated_egisters[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx; - *(int *) &deprecated_registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx; - *(int *) &deprecated_registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx; - *(int *) &deprecated_registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi; - *(int *) &deprecated_registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi; - *(int *) &deprecated_registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp; - *(int *) &deprecated_registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp; - *(int *) &deprecated_registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip; - *(int *) &deprecated_registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags; - for (i = 0; i < FPA_NREGS; i++) - { - *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)] = - regs.pr_fpa.fpa_regs[i]; - } - memcpy (&deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10); - memcpy (&deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10); -} - -/* FIXME: This should be merged with i387-tdep.c as well. */ -static -print_fpu_status (struct pt_regset ep) -{ - int i; - int bothstatus; - int top; - int fpreg; - unsigned char *p; - - printf_unfiltered ("80387:"); - if (ep.pr_fpu.fpu_ip == 0) - { - printf_unfiltered (" not in use.\n"); - return; - } - else - { - printf_unfiltered ("\n"); - } - if (ep.pr_fpu.fpu_status != 0) - { - print_387_status_word (ep.pr_fpu.fpu_status); - } - print_387_control_word (ep.pr_fpu.fpu_control); - printf_unfiltered ("last exception: "); - printf_unfiltered ("opcode 0x%x; ", ep.pr_fpu.fpu_rsvd4); - printf_unfiltered ("pc 0x%x:0x%x; ", ep.pr_fpu.fpu_cs, ep.pr_fpu.fpu_ip); - printf_unfiltered ("operand 0x%x:0x%x\n", ep.pr_fpu.fpu_data_offset, ep.pr_fpu.fpu_op_sel); - - top = (ep.pr_fpu.fpu_status >> 11) & 7; - - printf_unfiltered ("regno tag msb lsb value\n"); - for (fpreg = 7; fpreg >= 0; fpreg--) - { - double val; - - printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg); - - switch ((ep.pr_fpu.fpu_tag >> (fpreg * 2)) & 3) - { - case 0: - printf_unfiltered ("valid "); - break; - case 1: - printf_unfiltered ("zero "); - break; - case 2: - printf_unfiltered ("trap "); - break; - case 3: - printf_unfiltered ("empty "); - break; - } - for (i = 9; i >= 0; i--) - printf_unfiltered ("%02x", ep.pr_fpu.fpu_stack[fpreg][i]); - - i387_to_double ((char *) ep.pr_fpu.fpu_stack[fpreg], (char *) &val); - printf_unfiltered (" %g\n", val); - } - if (ep.pr_fpu.fpu_rsvd1) - warning ("rsvd1 is 0x%x\n", ep.pr_fpu.fpu_rsvd1); - if (ep.pr_fpu.fpu_rsvd2) - warning ("rsvd2 is 0x%x\n", ep.pr_fpu.fpu_rsvd2); - if (ep.pr_fpu.fpu_rsvd3) - warning ("rsvd3 is 0x%x\n", ep.pr_fpu.fpu_rsvd3); - if (ep.pr_fpu.fpu_rsvd5) - warning ("rsvd5 is 0x%x\n", ep.pr_fpu.fpu_rsvd5); -} - - -print_1167_control_word (unsigned int pcr) -{ - int pcr_tmp; - - pcr_tmp = pcr & FPA_PCR_MODE; - printf_unfiltered ("\tMODE= %#x; RND= %#x ", pcr_tmp, pcr_tmp & 12); - switch (pcr_tmp & 12) - { - case 0: - printf_unfiltered ("RN (Nearest Value)"); - break; - case 1: - printf_unfiltered ("RZ (Zero)"); - break; - case 2: - printf_unfiltered ("RP (Positive Infinity)"); - break; - case 3: - printf_unfiltered ("RM (Negative Infinity)"); - break; - } - printf_unfiltered ("; IRND= %d ", pcr_tmp & 2); - if (0 == pcr_tmp & 2) - { - printf_unfiltered ("(same as RND)\n"); - } - else - { - printf_unfiltered ("(toward zero)\n"); - } - pcr_tmp = pcr & FPA_PCR_EM; - printf_unfiltered ("\tEM= %#x", pcr_tmp); - if (pcr_tmp & FPA_PCR_EM_DM) - printf_unfiltered (" DM"); - if (pcr_tmp & FPA_PCR_EM_UOM) - printf_unfiltered (" UOM"); - if (pcr_tmp & FPA_PCR_EM_PM) - printf_unfiltered (" PM"); - if (pcr_tmp & FPA_PCR_EM_UM) - printf_unfiltered (" UM"); - if (pcr_tmp & FPA_PCR_EM_OM) - printf_unfiltered (" OM"); - if (pcr_tmp & FPA_PCR_EM_ZM) - printf_unfiltered (" ZM"); - if (pcr_tmp & FPA_PCR_EM_IM) - printf_unfiltered (" IM"); - printf_unfiltered ("\n"); - pcr_tmp = FPA_PCR_CC; - printf_unfiltered ("\tCC= %#x", pcr_tmp); - if (pcr_tmp & FPA_PCR_20MHZ) - printf_unfiltered (" 20MHZ"); - if (pcr_tmp & FPA_PCR_CC_Z) - printf_unfiltered (" Z"); - if (pcr_tmp & FPA_PCR_CC_C2) - printf_unfiltered (" C2"); - - /* Dynix defines FPA_PCR_CC_C0 to 0x100 and ptx defines - FPA_PCR_CC_C1 to 0x100. Use whichever is defined and assume - the OS knows what it is doing. */ -#ifdef FPA_PCR_CC_C1 - if (pcr_tmp & FPA_PCR_CC_C1) - printf_unfiltered (" C1"); -#else - if (pcr_tmp & FPA_PCR_CC_C0) - printf_unfiltered (" C0"); -#endif - - switch (pcr_tmp) - { - case FPA_PCR_CC_Z: - printf_unfiltered (" (Equal)"); - break; -#ifdef FPA_PCR_CC_C1 - case FPA_PCR_CC_C1: -#else - case FPA_PCR_CC_C0: -#endif - printf_unfiltered (" (Less than)"); - break; - case 0: - printf_unfiltered (" (Greater than)"); - break; - case FPA_PCR_CC_Z | -#ifdef FPA_PCR_CC_C1 - FPA_PCR_CC_C1 -#else - FPA_PCR_CC_C0 -#endif - | FPA_PCR_CC_C2: - printf_unfiltered (" (Unordered)"); - break; - default: - printf_unfiltered (" (Undefined)"); - break; - } - printf_unfiltered ("\n"); - pcr_tmp = pcr & FPA_PCR_AE; - printf_unfiltered ("\tAE= %#x", pcr_tmp); - if (pcr_tmp & FPA_PCR_AE_DE) - printf_unfiltered (" DE"); - if (pcr_tmp & FPA_PCR_AE_UOE) - printf_unfiltered (" UOE"); - if (pcr_tmp & FPA_PCR_AE_PE) - printf_unfiltered (" PE"); - if (pcr_tmp & FPA_PCR_AE_UE) - printf_unfiltered (" UE"); - if (pcr_tmp & FPA_PCR_AE_OE) - printf_unfiltered (" OE"); - if (pcr_tmp & FPA_PCR_AE_ZE) - printf_unfiltered (" ZE"); - if (pcr_tmp & FPA_PCR_AE_EE) - printf_unfiltered (" EE"); - if (pcr_tmp & FPA_PCR_AE_IE) - printf_unfiltered (" IE"); - printf_unfiltered ("\n"); -} - -print_1167_regs (long regs[FPA_NREGS]) -{ - int i; - - union - { - double d; - long l[2]; - } - xd; - union - { - float f; - long l; - } - xf; - - - for (i = 0; i < FPA_NREGS; i++) - { - xf.l = regs[i]; - printf_unfiltered ("%%fp%d: raw= %#x, single= %f", i + 1, regs[i], xf.f); - if (!(i & 1)) - { - printf_unfiltered ("\n"); - } - else - { - xd.l[1] = regs[i]; - xd.l[0] = regs[i + 1]; - printf_unfiltered (", double= %f\n", xd.d); - } - } -} - -print_fpa_status (struct pt_regset ep) -{ - - printf_unfiltered ("WTL 1167:"); - if (ep.pr_fpa.fpa_pcr != 0) - { - printf_unfiltered ("\n"); - print_1167_control_word (ep.pr_fpa.fpa_pcr); - print_1167_regs (ep.pr_fpa.fpa_regs); - } - else - { - printf_unfiltered (" not in use.\n"); - } -} - -#if 0 /* disabled because it doesn't go through the target vector. */ -i386_float_info (void) -{ - char ubuf[UPAGES * NBPG]; - struct pt_regset regset; - - if (have_inferior_p ()) - { - PTRACE_READ_REGS (PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regset); - } - else - { - int corechan = bfd_cache_lookup (core_bfd); - if (lseek (corechan, 0, 0) < 0) - { - perror ("seek on core file"); - } - if (myread (corechan, ubuf, UPAGES * NBPG) < 0) - { - perror ("read on core file"); - } - /* only interested in the floating point registers */ - regset.pr_fpu = ((struct user *) ubuf)->u_fpusave; - regset.pr_fpa = ((struct user *) ubuf)->u_fpasave; - } - print_fpu_status (regset); - print_fpa_status (regset); -} -#endif - -static volatile int got_sigchld; - -/*ARGSUSED */ -/* This will eventually be more interesting. */ -void -sigchld_handler (int signo) -{ - got_sigchld++; -} - -/* - * Signals for which the default action does not cause the process - * to die. See <sys/signal.h> for where this came from (alas, we - * can't use those macros directly) - */ -#ifndef sigmask -#define sigmask(s) (1 << ((s) - 1)) -#endif -#define SIGNALS_DFL_SAFE sigmask(SIGSTOP) | sigmask(SIGTSTP) | \ - sigmask(SIGTTIN) | sigmask(SIGTTOU) | sigmask(SIGCHLD) | \ - sigmask(SIGCONT) | sigmask(SIGWINCH) | sigmask(SIGPWR) | \ - sigmask(SIGURG) | sigmask(SIGPOLL) - -#ifdef ATTACH_DETACH -/* - * Thanks to XPT_MPDEBUGGER, we have to mange child_wait(). - */ -ptid_t -child_wait (ptid_t ptid, struct target_waitstatus *status) -{ - int save_errno, rv, xvaloff, saoff, sa_hand; - struct pt_stop pt; - struct user u; - sigset_t set; - /* Host signal number for a signal which the inferior terminates with, or - 0 if it hasn't terminated due to a signal. */ - static int death_by_signal = 0; -#ifdef SVR4_SHARED_LIBS /* use this to distinguish ptx 2 vs ptx 4 */ - prstatus_t pstatus; -#endif - int pid = PIDGET (ptid); - - do - { - set_sigint_trap (); /* Causes SIGINT to be passed on to the - attached process. */ - save_errno = errno; - - got_sigchld = 0; - - sigemptyset (&set); - - while (got_sigchld == 0) - { - sigsuspend (&set); - } - - clear_sigint_trap (); - - rv = mptrace (XPT_STOPSTAT, 0, (char *) &pt, 0); - if (-1 == rv) - { - printf ("XPT_STOPSTAT: errno %d\n", errno); /* DEBUG */ - continue; - } - - pid = pt.ps_pid; - - if (pid != PIDGET (inferior_ptid)) - { - /* NOTE: the mystery fork in csh/tcsh needs to be ignored. - * We should not return new children for the initial run - * of a process until it has done the exec. - */ - /* inferior probably forked; send it on its way */ - rv = mptrace (XPT_UNDEBUG, pid, 0, 0); - if (-1 == rv) - { - printf ("child_wait: XPT_UNDEBUG: pid %d: %s\n", pid, - safe_strerror (errno)); - } - continue; - } - /* FIXME: Do we deal with fork notification correctly? */ - switch (pt.ps_reason) - { - case PTS_FORK: - /* multi proc: treat like PTS_EXEC */ - /* - * Pretend this didn't happen, since gdb isn't set up - * to deal with stops on fork. - */ - rv = ptrace (PT_CONTSIG, pid, 1, 0); - if (-1 == rv) - { - printf ("PTS_FORK: PT_CONTSIG: error %d\n", errno); - } - continue; - case PTS_EXEC: - /* - * Pretend this is a SIGTRAP. - */ - status->kind = TARGET_WAITKIND_STOPPED; - status->value.sig = TARGET_SIGNAL_TRAP; - break; - case PTS_EXIT: - /* - * Note: we stop before the exit actually occurs. Extract - * the exit code from the uarea. If we're stopped in the - * exit() system call, the exit code will be in - * u.u_ap[0]. An exit due to an uncaught signal will have - * something else in here, see the comment in the default: - * case, below. Finally,let the process exit. - */ - if (death_by_signal) - { - status->kind = TARGET_WAITKIND_SIGNALED; - status->value.sig = target_signal_from_host (death_by_signal); - death_by_signal = 0; - break; - } - xvaloff = (unsigned long) &u.u_ap[0] - (unsigned long) &u; - errno = 0; - rv = ptrace (PT_RUSER, pid, (char *) xvaloff, 0); - status->kind = TARGET_WAITKIND_EXITED; - status->value.integer = rv; - /* - * addr & data to mptrace() don't matter here, since - * the process is already dead. - */ - rv = mptrace (XPT_UNDEBUG, pid, 0, 0); - if (-1 == rv) - { - printf ("child_wait: PTS_EXIT: XPT_UNDEBUG: pid %d error %d\n", pid, - errno); - } - break; - case PTS_WATCHPT_HIT: - internal_error (__FILE__, __LINE__, - "PTS_WATCHPT_HIT\n"); - break; - default: - /* stopped by signal */ - status->kind = TARGET_WAITKIND_STOPPED; - status->value.sig = target_signal_from_host (pt.ps_reason); - death_by_signal = 0; - - if (0 == (SIGNALS_DFL_SAFE & sigmask (pt.ps_reason))) - { - break; - } - /* else default action of signal is to die */ -#ifdef SVR4_SHARED_LIBS - rv = ptrace (PT_GET_PRSTATUS, pid, (char *) &pstatus, 0); - if (-1 == rv) - error ("child_wait: signal %d PT_GET_PRSTATUS: %s\n", - pt.ps_reason, safe_strerror (errno)); - if (pstatus.pr_cursig != pt.ps_reason) - { - printf ("pstatus signal %d, pt signal %d\n", - pstatus.pr_cursig, pt.ps_reason); - } - sa_hand = (int) pstatus.pr_action.sa_handler; -#else - saoff = (unsigned long) &u.u_sa[0] - (unsigned long) &u; - saoff += sizeof (struct sigaction) * (pt.ps_reason - 1); - errno = 0; - sa_hand = ptrace (PT_RUSER, pid, (char *) saoff, 0); - if (errno) - error ("child_wait: signal %d: RUSER: %s\n", - pt.ps_reason, safe_strerror (errno)); -#endif - if ((int) SIG_DFL == sa_hand) - { - /* we will be dying */ - death_by_signal = pt.ps_reason; - } - break; - } - - } - while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */ - - return pid_to_ptid (pid); -} -#else /* !ATTACH_DETACH */ -/* - * Simple child_wait() based on inftarg.c child_wait() for use until - * the MPDEBUGGER child_wait() works properly. This will go away when - * that is fixed. - */ -ptid_t -child_wait (ptid_t ptid, struct target_waitstatus *ourstatus) -{ - int save_errno; - int status; - int pid = PIDGET (ptid); - - do - { - pid = wait (&status); - save_errno = errno; - - if (pid == -1) - { - if (save_errno == EINTR) - continue; - fprintf (stderr, "Child process unexpectedly missing: %s.\n", - safe_strerror (save_errno)); - ourstatus->kind = TARGET_WAITKIND_SIGNALLED; - ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; - return pid_to_ptid (-1); - } - } - while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */ - store_waitstatus (ourstatus, status); - return pid_to_ptid (pid); -} -#endif /* ATTACH_DETACH */ - - - -/* This function simply calls ptrace with the given arguments. - It exists so that all calls to ptrace are isolated in this - machine-dependent file. */ -int -call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data) -{ - return ptrace (request, pid, addr, data); -} - -int -call_mptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data) -{ - return mptrace (request, pid, addr, data); -} - -#if defined (DEBUG_PTRACE) -/* For the rest of the file, use an extra level of indirection */ -/* This lets us breakpoint usefully on call_ptrace. */ -#define ptrace call_ptrace -#define mptrace call_mptrace -#endif - -void -kill_inferior (void) -{ - if (ptid_equal (inferior_ptid, null_ptid)) - return; - - /* For MPDEBUGGER, don't use PT_KILL, since the child will stop - again with a PTS_EXIT. Just hit him with SIGKILL (so he stops) - and detach. */ - - kill (PIDGET (inferior_ptid), SIGKILL); -#ifdef ATTACH_DETACH - detach (SIGKILL); -#else /* ATTACH_DETACH */ - ptrace (PT_KILL, PIDGET (inferior_ptid), 0, 0); - wait ((int *) NULL); -#endif /* ATTACH_DETACH */ - target_mourn_inferior (); -} - -/* Resume execution of the inferior process. - If STEP is nonzero, single-step it. - If SIGNAL is nonzero, give it that signal. */ - -void -child_resume (ptid_t ptid, int step, enum target_signal signal) -{ - int pid = PIDGET (ptid); - - errno = 0; - - if (pid == -1) - pid = PIDGET (inferior_ptid); - - /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where - it was. (If GDB wanted it to start some other way, we have already - written a new PC value to the child.) - - If this system does not support PT_SSTEP, a higher level function will - have called single_step() to transmute the step request into a - continue request (by setting breakpoints on all possible successor - instructions), so we don't have to worry about that here. */ - - if (step) - ptrace (PT_SSTEP, pid, (PTRACE_ARG3_TYPE) 1, signal); - else - ptrace (PT_CONTSIG, pid, (PTRACE_ARG3_TYPE) 1, signal); - - if (errno) - perror_with_name ("ptrace"); -} - -#ifdef ATTACH_DETACH -/* Start debugging the process whose number is PID. */ -int -attach (int pid) -{ - sigset_t set; - int rv; - - rv = mptrace (XPT_DEBUG, pid, 0, 0); - if (-1 == rv) - { - error ("mptrace(XPT_DEBUG): %s", safe_strerror (errno)); - } - rv = mptrace (XPT_SIGNAL, pid, 0, SIGSTOP); - if (-1 == rv) - { - error ("mptrace(XPT_SIGNAL): %s", safe_strerror (errno)); - } - attach_flag = 1; - return pid; -} - -void -detach (int signo) -{ - int rv; - - rv = mptrace (XPT_UNDEBUG, PIDGET (inferior_ptid), 1, signo); - if (-1 == rv) - { - error ("mptrace(XPT_UNDEBUG): %s", safe_strerror (errno)); - } - attach_flag = 0; -} - -#endif /* ATTACH_DETACH */ - -/* Default the type of the ptrace transfer to int. */ -#ifndef PTRACE_XFER_TYPE -#define PTRACE_XFER_TYPE int -#endif - - -/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory - in the NEW_SUN_PTRACE case. - It ought to be straightforward. But it appears that writing did - not write the data that I specified. I cannot understand where - it got the data that it actually did write. */ - -/* Copy LEN bytes to or from inferior's memory starting at MEMADDR - to debugger memory starting at MYADDR. Copy to inferior if - WRITE is nonzero. TARGET is ignored. - - Returns the length copied, which is either the LEN argument or zero. - This xfer function does not do partial moves, since child_ops - doesn't allow memory operations to cross below us in the target stack - anyway. */ - -int -child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, - struct mem_attrib *attrib, - struct target_ops *target) -{ - register int i; - /* Round starting address down to longword boundary. */ - register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE); - /* Round ending address up; get number of longwords that makes. */ - register int count - = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1) - / sizeof (PTRACE_XFER_TYPE); - /* Allocate buffer of that many longwords. */ - /* FIXME (alloca): This code, cloned from infptrace.c, is unsafe - because it uses alloca to allocate a buffer of arbitrary size. - For very large xfers, this could crash GDB's stack. */ - register PTRACE_XFER_TYPE *buffer - = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE)); - - if (write) - { - /* Fill start and end extra bytes of buffer with existing memory data. */ - - if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE)) - { - /* Need part of initial word -- fetch it. */ - buffer[0] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr, - 0); - } - - if (count > 1) /* FIXME, avoid if even boundary */ - { - buffer[count - 1] - = ptrace (PT_RTEXT, PIDGET (inferior_ptid), - ((PTRACE_ARG3_TYPE) - (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))), - 0); - } - - /* Copy data to be written over corresponding part of buffer */ - - memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)), - myaddr, - len); - - /* Write the entire buffer. */ - - for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE)) - { - errno = 0; - ptrace (PT_WDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr, - buffer[i]); - if (errno) - { - /* Using the appropriate one (I or D) is necessary for - Gould NP1, at least. */ - errno = 0; - ptrace (PT_WTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr, - buffer[i]); - } - if (errno) - return 0; - } - } - else - { - /* Read all the longwords */ - for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE)) - { - errno = 0; - buffer[i] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), - (PTRACE_ARG3_TYPE) addr, 0); - if (errno) - return 0; - QUIT; - } - - /* Copy appropriate bytes out of the buffer. */ - memcpy (myaddr, - (char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)), - len); - } - return len; -} - - -void -_initialize_symm_nat (void) -{ -#ifdef ATTACH_DETACH -/* - * the MPDEBUGGER is necessary for process tree debugging and attach - * to work, but it alters the behavior of debugged processes, so other - * things (at least child_wait()) will have to change to accomodate - * that. - * - * Note that attach is not implemented in dynix 3, and not in ptx - * until version 2.1 of the OS. - */ - int rv; - sigset_t set; - struct sigaction sact; - - rv = mptrace (XPT_MPDEBUGGER, 0, 0, 0); - if (-1 == rv) - { - internal_error (__FILE__, __LINE__, - "_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s", - safe_strerror (errno)); - } - - /* - * Under MPDEBUGGER, we get SIGCLHD when a traced process does - * anything of interest. - */ - - /* - * Block SIGCHLD. We leave it blocked all the time, and then - * call sigsuspend() in child_wait() to wait for the child - * to do something. None of these ought to fail, but check anyway. - */ - sigemptyset (&set); - rv = sigaddset (&set, SIGCHLD); - if (-1 == rv) - { - internal_error (__FILE__, __LINE__, - "_initialize_symm_nat(): sigaddset(SIGCHLD): %s", - safe_strerror (errno)); - } - rv = sigprocmask (SIG_BLOCK, &set, (sigset_t *) NULL); - if (-1 == rv) - { - internal_error (__FILE__, __LINE__, - "_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s", - safe_strerror (errno)); - } - - sact.sa_handler = sigchld_handler; - sigemptyset (&sact.sa_mask); - sact.sa_flags = SA_NOCLDWAIT; /* keep the zombies away */ - rv = sigaction (SIGCHLD, &sact, (struct sigaction *) NULL); - if (-1 == rv) - { - internal_error (__FILE__, __LINE__, - "_initialize_symm_nat(): sigaction(SIGCHLD): %s", - safe_strerror (errno)); - } -#endif -} +// OBSOLETE /* Sequent Symmetry host interface, for GDB when running under Unix. +// OBSOLETE +// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1999, +// OBSOLETE 2000, 2001, 2003 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 /* FIXME, some 387-specific items of use taken from i387-tdep.c -- ought to be +// OBSOLETE merged back in. */ +// OBSOLETE +// OBSOLETE #include "defs.h" +// OBSOLETE #include "frame.h" +// OBSOLETE #include "inferior.h" +// OBSOLETE #include "symtab.h" +// OBSOLETE #include "target.h" +// OBSOLETE #include "regcache.h" +// OBSOLETE +// OBSOLETE /* FIXME: What is the _INKERNEL define for? */ +// OBSOLETE #define _INKERNEL +// OBSOLETE #include <signal.h> +// OBSOLETE #undef _INKERNEL +// OBSOLETE #include "gdb_wait.h" +// OBSOLETE #include <sys/param.h> +// OBSOLETE #include <sys/user.h> +// OBSOLETE #include <sys/proc.h> +// OBSOLETE #include <sys/dir.h> +// OBSOLETE #include <sys/ioctl.h> +// OBSOLETE #include "gdb_stat.h" +// OBSOLETE #ifdef _SEQUENT_ +// OBSOLETE #include <sys/ptrace.h> +// OBSOLETE #else +// OBSOLETE /* Dynix has only machine/ptrace.h, which is already included by sys/user.h */ +// OBSOLETE /* Dynix has no mptrace call */ +// OBSOLETE #define mptrace ptrace +// OBSOLETE #endif +// OBSOLETE #include "gdbcore.h" +// OBSOLETE #include <fcntl.h> +// OBSOLETE #include <sgtty.h> +// OBSOLETE #define TERMINAL struct sgttyb +// OBSOLETE +// OBSOLETE #include "gdbcore.h" +// OBSOLETE +// OBSOLETE void +// OBSOLETE store_inferior_registers (int regno) +// OBSOLETE { +// OBSOLETE struct pt_regset regs; +// OBSOLETE int i; +// OBSOLETE +// OBSOLETE /* FIXME: Fetching the registers is a kludge to initialize all elements +// OBSOLETE in the fpu and fpa status. This works for normal debugging, but +// OBSOLETE might cause problems when calling functions in the inferior. +// OBSOLETE At least fpu_control and fpa_pcr (probably more) should be added +// OBSOLETE to the registers array to solve this properly. */ +// OBSOLETE mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0); +// OBSOLETE +// OBSOLETE regs.pr_eax = *(int *) &deprecated_registers[REGISTER_BYTE (0)]; +// OBSOLETE regs.pr_ebx = *(int *) &deprecated_registers[REGISTER_BYTE (5)]; +// OBSOLETE regs.pr_ecx = *(int *) &deprecated_registers[REGISTER_BYTE (2)]; +// OBSOLETE regs.pr_edx = *(int *) &deprecated_registers[REGISTER_BYTE (1)]; +// OBSOLETE regs.pr_esi = *(int *) &deprecated_registers[REGISTER_BYTE (6)]; +// OBSOLETE regs.pr_edi = *(int *) &deprecated_registers[REGISTER_BYTE (7)]; +// OBSOLETE regs.pr_esp = *(int *) &deprecated_registers[REGISTER_BYTE (14)]; +// OBSOLETE regs.pr_ebp = *(int *) &deprecated_registers[REGISTER_BYTE (15)]; +// OBSOLETE regs.pr_eip = *(int *) &deprecated_registers[REGISTER_BYTE (16)]; +// OBSOLETE regs.pr_flags = *(int *) &deprecated_registers[REGISTER_BYTE (17)]; +// OBSOLETE for (i = 0; i < 31; i++) +// OBSOLETE { +// OBSOLETE regs.pr_fpa.fpa_regs[i] = +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)]; +// OBSOLETE } +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[0], &deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[1], &deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[2], &deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[3], &deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[4], &deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[5], &deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[6], &deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], 10); +// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[7], &deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], 10); +// OBSOLETE mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0); +// OBSOLETE } +// OBSOLETE +// OBSOLETE void +// OBSOLETE fetch_inferior_registers (int regno) +// OBSOLETE { +// OBSOLETE int i; +// OBSOLETE struct pt_regset regs; +// OBSOLETE +// OBSOLETE deprecated_registers_fetched (); +// OBSOLETE +// OBSOLETE mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0); +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax; +// OBSOLETE *(int *) &rdeprecated_egisters[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip; +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags; +// OBSOLETE for (i = 0; i < FPA_NREGS; i++) +// OBSOLETE { +// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)] = +// OBSOLETE regs.pr_fpa.fpa_regs[i]; +// OBSOLETE } +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10); +// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* FIXME: This should be merged with i387-tdep.c as well. */ +// OBSOLETE static +// OBSOLETE print_fpu_status (struct pt_regset ep) +// OBSOLETE { +// OBSOLETE int i; +// OBSOLETE int bothstatus; +// OBSOLETE int top; +// OBSOLETE int fpreg; +// OBSOLETE unsigned char *p; +// OBSOLETE +// OBSOLETE printf_unfiltered ("80387:"); +// OBSOLETE if (ep.pr_fpu.fpu_ip == 0) +// OBSOLETE { +// OBSOLETE printf_unfiltered (" not in use.\n"); +// OBSOLETE return; +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE printf_unfiltered ("\n"); +// OBSOLETE } +// OBSOLETE if (ep.pr_fpu.fpu_status != 0) +// OBSOLETE { +// OBSOLETE print_387_status_word (ep.pr_fpu.fpu_status); +// OBSOLETE } +// OBSOLETE print_387_control_word (ep.pr_fpu.fpu_control); +// OBSOLETE printf_unfiltered ("last exception: "); +// OBSOLETE printf_unfiltered ("opcode 0x%x; ", ep.pr_fpu.fpu_rsvd4); +// OBSOLETE printf_unfiltered ("pc 0x%x:0x%x; ", ep.pr_fpu.fpu_cs, ep.pr_fpu.fpu_ip); +// OBSOLETE printf_unfiltered ("operand 0x%x:0x%x\n", ep.pr_fpu.fpu_data_offset, ep.pr_fpu.fpu_op_sel); +// OBSOLETE +// OBSOLETE top = (ep.pr_fpu.fpu_status >> 11) & 7; +// OBSOLETE +// OBSOLETE printf_unfiltered ("regno tag msb lsb value\n"); +// OBSOLETE for (fpreg = 7; fpreg >= 0; fpreg--) +// OBSOLETE { +// OBSOLETE double val; +// OBSOLETE +// OBSOLETE printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg); +// OBSOLETE +// OBSOLETE switch ((ep.pr_fpu.fpu_tag >> (fpreg * 2)) & 3) +// OBSOLETE { +// OBSOLETE case 0: +// OBSOLETE printf_unfiltered ("valid "); +// OBSOLETE break; +// OBSOLETE case 1: +// OBSOLETE printf_unfiltered ("zero "); +// OBSOLETE break; +// OBSOLETE case 2: +// OBSOLETE printf_unfiltered ("trap "); +// OBSOLETE break; +// OBSOLETE case 3: +// OBSOLETE printf_unfiltered ("empty "); +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE for (i = 9; i >= 0; i--) +// OBSOLETE printf_unfiltered ("%02x", ep.pr_fpu.fpu_stack[fpreg][i]); +// OBSOLETE +// OBSOLETE i387_to_double ((char *) ep.pr_fpu.fpu_stack[fpreg], (char *) &val); +// OBSOLETE printf_unfiltered (" %g\n", val); +// OBSOLETE } +// OBSOLETE if (ep.pr_fpu.fpu_rsvd1) +// OBSOLETE warning ("rsvd1 is 0x%x\n", ep.pr_fpu.fpu_rsvd1); +// OBSOLETE if (ep.pr_fpu.fpu_rsvd2) +// OBSOLETE warning ("rsvd2 is 0x%x\n", ep.pr_fpu.fpu_rsvd2); +// OBSOLETE if (ep.pr_fpu.fpu_rsvd3) +// OBSOLETE warning ("rsvd3 is 0x%x\n", ep.pr_fpu.fpu_rsvd3); +// OBSOLETE if (ep.pr_fpu.fpu_rsvd5) +// OBSOLETE warning ("rsvd5 is 0x%x\n", ep.pr_fpu.fpu_rsvd5); +// OBSOLETE } +// OBSOLETE +// OBSOLETE +// OBSOLETE print_1167_control_word (unsigned int pcr) +// OBSOLETE { +// OBSOLETE int pcr_tmp; +// OBSOLETE +// OBSOLETE pcr_tmp = pcr & FPA_PCR_MODE; +// OBSOLETE printf_unfiltered ("\tMODE= %#x; RND= %#x ", pcr_tmp, pcr_tmp & 12); +// OBSOLETE switch (pcr_tmp & 12) +// OBSOLETE { +// OBSOLETE case 0: +// OBSOLETE printf_unfiltered ("RN (Nearest Value)"); +// OBSOLETE break; +// OBSOLETE case 1: +// OBSOLETE printf_unfiltered ("RZ (Zero)"); +// OBSOLETE break; +// OBSOLETE case 2: +// OBSOLETE printf_unfiltered ("RP (Positive Infinity)"); +// OBSOLETE break; +// OBSOLETE case 3: +// OBSOLETE printf_unfiltered ("RM (Negative Infinity)"); +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE printf_unfiltered ("; IRND= %d ", pcr_tmp & 2); +// OBSOLETE if (0 == pcr_tmp & 2) +// OBSOLETE { +// OBSOLETE printf_unfiltered ("(same as RND)\n"); +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE printf_unfiltered ("(toward zero)\n"); +// OBSOLETE } +// OBSOLETE pcr_tmp = pcr & FPA_PCR_EM; +// OBSOLETE printf_unfiltered ("\tEM= %#x", pcr_tmp); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_DM) +// OBSOLETE printf_unfiltered (" DM"); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_UOM) +// OBSOLETE printf_unfiltered (" UOM"); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_PM) +// OBSOLETE printf_unfiltered (" PM"); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_UM) +// OBSOLETE printf_unfiltered (" UM"); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_OM) +// OBSOLETE printf_unfiltered (" OM"); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_ZM) +// OBSOLETE printf_unfiltered (" ZM"); +// OBSOLETE if (pcr_tmp & FPA_PCR_EM_IM) +// OBSOLETE printf_unfiltered (" IM"); +// OBSOLETE printf_unfiltered ("\n"); +// OBSOLETE pcr_tmp = FPA_PCR_CC; +// OBSOLETE printf_unfiltered ("\tCC= %#x", pcr_tmp); +// OBSOLETE if (pcr_tmp & FPA_PCR_20MHZ) +// OBSOLETE printf_unfiltered (" 20MHZ"); +// OBSOLETE if (pcr_tmp & FPA_PCR_CC_Z) +// OBSOLETE printf_unfiltered (" Z"); +// OBSOLETE if (pcr_tmp & FPA_PCR_CC_C2) +// OBSOLETE printf_unfiltered (" C2"); +// OBSOLETE +// OBSOLETE /* Dynix defines FPA_PCR_CC_C0 to 0x100 and ptx defines +// OBSOLETE FPA_PCR_CC_C1 to 0x100. Use whichever is defined and assume +// OBSOLETE the OS knows what it is doing. */ +// OBSOLETE #ifdef FPA_PCR_CC_C1 +// OBSOLETE if (pcr_tmp & FPA_PCR_CC_C1) +// OBSOLETE printf_unfiltered (" C1"); +// OBSOLETE #else +// OBSOLETE if (pcr_tmp & FPA_PCR_CC_C0) +// OBSOLETE printf_unfiltered (" C0"); +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE switch (pcr_tmp) +// OBSOLETE { +// OBSOLETE case FPA_PCR_CC_Z: +// OBSOLETE printf_unfiltered (" (Equal)"); +// OBSOLETE break; +// OBSOLETE #ifdef FPA_PCR_CC_C1 +// OBSOLETE case FPA_PCR_CC_C1: +// OBSOLETE #else +// OBSOLETE case FPA_PCR_CC_C0: +// OBSOLETE #endif +// OBSOLETE printf_unfiltered (" (Less than)"); +// OBSOLETE break; +// OBSOLETE case 0: +// OBSOLETE printf_unfiltered (" (Greater than)"); +// OBSOLETE break; +// OBSOLETE case FPA_PCR_CC_Z | +// OBSOLETE #ifdef FPA_PCR_CC_C1 +// OBSOLETE FPA_PCR_CC_C1 +// OBSOLETE #else +// OBSOLETE FPA_PCR_CC_C0 +// OBSOLETE #endif +// OBSOLETE | FPA_PCR_CC_C2: +// OBSOLETE printf_unfiltered (" (Unordered)"); +// OBSOLETE break; +// OBSOLETE default: +// OBSOLETE printf_unfiltered (" (Undefined)"); +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE printf_unfiltered ("\n"); +// OBSOLETE pcr_tmp = pcr & FPA_PCR_AE; +// OBSOLETE printf_unfiltered ("\tAE= %#x", pcr_tmp); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_DE) +// OBSOLETE printf_unfiltered (" DE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_UOE) +// OBSOLETE printf_unfiltered (" UOE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_PE) +// OBSOLETE printf_unfiltered (" PE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_UE) +// OBSOLETE printf_unfiltered (" UE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_OE) +// OBSOLETE printf_unfiltered (" OE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_ZE) +// OBSOLETE printf_unfiltered (" ZE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_EE) +// OBSOLETE printf_unfiltered (" EE"); +// OBSOLETE if (pcr_tmp & FPA_PCR_AE_IE) +// OBSOLETE printf_unfiltered (" IE"); +// OBSOLETE printf_unfiltered ("\n"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE print_1167_regs (long regs[FPA_NREGS]) +// OBSOLETE { +// OBSOLETE int i; +// OBSOLETE +// OBSOLETE union +// OBSOLETE { +// OBSOLETE double d; +// OBSOLETE long l[2]; +// OBSOLETE } +// OBSOLETE xd; +// OBSOLETE union +// OBSOLETE { +// OBSOLETE float f; +// OBSOLETE long l; +// OBSOLETE } +// OBSOLETE xf; +// OBSOLETE +// OBSOLETE +// OBSOLETE for (i = 0; i < FPA_NREGS; i++) +// OBSOLETE { +// OBSOLETE xf.l = regs[i]; +// OBSOLETE printf_unfiltered ("%%fp%d: raw= %#x, single= %f", i + 1, regs[i], xf.f); +// OBSOLETE if (!(i & 1)) +// OBSOLETE { +// OBSOLETE printf_unfiltered ("\n"); +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE xd.l[1] = regs[i]; +// OBSOLETE xd.l[0] = regs[i + 1]; +// OBSOLETE printf_unfiltered (", double= %f\n", xd.d); +// OBSOLETE } +// OBSOLETE } +// OBSOLETE } +// OBSOLETE +// OBSOLETE print_fpa_status (struct pt_regset ep) +// OBSOLETE { +// OBSOLETE +// OBSOLETE printf_unfiltered ("WTL 1167:"); +// OBSOLETE if (ep.pr_fpa.fpa_pcr != 0) +// OBSOLETE { +// OBSOLETE printf_unfiltered ("\n"); +// OBSOLETE print_1167_control_word (ep.pr_fpa.fpa_pcr); +// OBSOLETE print_1167_regs (ep.pr_fpa.fpa_regs); +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE printf_unfiltered (" not in use.\n"); +// OBSOLETE } +// OBSOLETE } +// OBSOLETE +// OBSOLETE #if 0 /* disabled because it doesn't go through the target vector. */ +// OBSOLETE i386_float_info (void) +// OBSOLETE { +// OBSOLETE char ubuf[UPAGES * NBPG]; +// OBSOLETE struct pt_regset regset; +// OBSOLETE +// OBSOLETE if (have_inferior_p ()) +// OBSOLETE { +// OBSOLETE PTRACE_READ_REGS (PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regset); +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE int corechan = bfd_cache_lookup (core_bfd); +// OBSOLETE if (lseek (corechan, 0, 0) < 0) +// OBSOLETE { +// OBSOLETE perror ("seek on core file"); +// OBSOLETE } +// OBSOLETE if (myread (corechan, ubuf, UPAGES * NBPG) < 0) +// OBSOLETE { +// OBSOLETE perror ("read on core file"); +// OBSOLETE } +// OBSOLETE /* only interested in the floating point registers */ +// OBSOLETE regset.pr_fpu = ((struct user *) ubuf)->u_fpusave; +// OBSOLETE regset.pr_fpa = ((struct user *) ubuf)->u_fpasave; +// OBSOLETE } +// OBSOLETE print_fpu_status (regset); +// OBSOLETE print_fpa_status (regset); +// OBSOLETE } +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE static volatile int got_sigchld; +// OBSOLETE +// OBSOLETE /*ARGSUSED */ +// OBSOLETE /* This will eventually be more interesting. */ +// OBSOLETE void +// OBSOLETE sigchld_handler (int signo) +// OBSOLETE { +// OBSOLETE got_sigchld++; +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * Signals for which the default action does not cause the process +// OBSOLETE * to die. See <sys/signal.h> for where this came from (alas, we +// OBSOLETE * can't use those macros directly) +// OBSOLETE */ +// OBSOLETE #ifndef sigmask +// OBSOLETE #define sigmask(s) (1 << ((s) - 1)) +// OBSOLETE #endif +// OBSOLETE #define SIGNALS_DFL_SAFE sigmask(SIGSTOP) | sigmask(SIGTSTP) | \ +// OBSOLETE sigmask(SIGTTIN) | sigmask(SIGTTOU) | sigmask(SIGCHLD) | \ +// OBSOLETE sigmask(SIGCONT) | sigmask(SIGWINCH) | sigmask(SIGPWR) | \ +// OBSOLETE sigmask(SIGURG) | sigmask(SIGPOLL) +// OBSOLETE +// OBSOLETE #ifdef ATTACH_DETACH +// OBSOLETE /* +// OBSOLETE * Thanks to XPT_MPDEBUGGER, we have to mange child_wait(). +// OBSOLETE */ +// OBSOLETE ptid_t +// OBSOLETE child_wait (ptid_t ptid, struct target_waitstatus *status) +// OBSOLETE { +// OBSOLETE int save_errno, rv, xvaloff, saoff, sa_hand; +// OBSOLETE struct pt_stop pt; +// OBSOLETE struct user u; +// OBSOLETE sigset_t set; +// OBSOLETE /* Host signal number for a signal which the inferior terminates with, or +// OBSOLETE 0 if it hasn't terminated due to a signal. */ +// OBSOLETE static int death_by_signal = 0; +// OBSOLETE #ifdef SVR4_SHARED_LIBS /* use this to distinguish ptx 2 vs ptx 4 */ +// OBSOLETE prstatus_t pstatus; +// OBSOLETE #endif +// OBSOLETE int pid = PIDGET (ptid); +// OBSOLETE +// OBSOLETE do +// OBSOLETE { +// OBSOLETE set_sigint_trap (); /* Causes SIGINT to be passed on to the +// OBSOLETE attached process. */ +// OBSOLETE save_errno = errno; +// OBSOLETE +// OBSOLETE got_sigchld = 0; +// OBSOLETE +// OBSOLETE sigemptyset (&set); +// OBSOLETE +// OBSOLETE while (got_sigchld == 0) +// OBSOLETE { +// OBSOLETE sigsuspend (&set); +// OBSOLETE } +// OBSOLETE +// OBSOLETE clear_sigint_trap (); +// OBSOLETE +// OBSOLETE rv = mptrace (XPT_STOPSTAT, 0, (char *) &pt, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE printf ("XPT_STOPSTAT: errno %d\n", errno); /* DEBUG */ +// OBSOLETE continue; +// OBSOLETE } +// OBSOLETE +// OBSOLETE pid = pt.ps_pid; +// OBSOLETE +// OBSOLETE if (pid != PIDGET (inferior_ptid)) +// OBSOLETE { +// OBSOLETE /* NOTE: the mystery fork in csh/tcsh needs to be ignored. +// OBSOLETE * We should not return new children for the initial run +// OBSOLETE * of a process until it has done the exec. +// OBSOLETE */ +// OBSOLETE /* inferior probably forked; send it on its way */ +// OBSOLETE rv = mptrace (XPT_UNDEBUG, pid, 0, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE printf ("child_wait: XPT_UNDEBUG: pid %d: %s\n", pid, +// OBSOLETE safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE continue; +// OBSOLETE } +// OBSOLETE /* FIXME: Do we deal with fork notification correctly? */ +// OBSOLETE switch (pt.ps_reason) +// OBSOLETE { +// OBSOLETE case PTS_FORK: +// OBSOLETE /* multi proc: treat like PTS_EXEC */ +// OBSOLETE /* +// OBSOLETE * Pretend this didn't happen, since gdb isn't set up +// OBSOLETE * to deal with stops on fork. +// OBSOLETE */ +// OBSOLETE rv = ptrace (PT_CONTSIG, pid, 1, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE printf ("PTS_FORK: PT_CONTSIG: error %d\n", errno); +// OBSOLETE } +// OBSOLETE continue; +// OBSOLETE case PTS_EXEC: +// OBSOLETE /* +// OBSOLETE * Pretend this is a SIGTRAP. +// OBSOLETE */ +// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; +// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; +// OBSOLETE break; +// OBSOLETE case PTS_EXIT: +// OBSOLETE /* +// OBSOLETE * Note: we stop before the exit actually occurs. Extract +// OBSOLETE * the exit code from the uarea. If we're stopped in the +// OBSOLETE * exit() system call, the exit code will be in +// OBSOLETE * u.u_ap[0]. An exit due to an uncaught signal will have +// OBSOLETE * something else in here, see the comment in the default: +// OBSOLETE * case, below. Finally,let the process exit. +// OBSOLETE */ +// OBSOLETE if (death_by_signal) +// OBSOLETE { +// OBSOLETE status->kind = TARGET_WAITKIND_SIGNALED; +// OBSOLETE status->value.sig = target_signal_from_host (death_by_signal); +// OBSOLETE death_by_signal = 0; +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE xvaloff = (unsigned long) &u.u_ap[0] - (unsigned long) &u; +// OBSOLETE errno = 0; +// OBSOLETE rv = ptrace (PT_RUSER, pid, (char *) xvaloff, 0); +// OBSOLETE status->kind = TARGET_WAITKIND_EXITED; +// OBSOLETE status->value.integer = rv; +// OBSOLETE /* +// OBSOLETE * addr & data to mptrace() don't matter here, since +// OBSOLETE * the process is already dead. +// OBSOLETE */ +// OBSOLETE rv = mptrace (XPT_UNDEBUG, pid, 0, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE printf ("child_wait: PTS_EXIT: XPT_UNDEBUG: pid %d error %d\n", pid, +// OBSOLETE errno); +// OBSOLETE } +// OBSOLETE break; +// OBSOLETE case PTS_WATCHPT_HIT: +// OBSOLETE internal_error (__FILE__, __LINE__, +// OBSOLETE "PTS_WATCHPT_HIT\n"); +// OBSOLETE break; +// OBSOLETE default: +// OBSOLETE /* stopped by signal */ +// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; +// OBSOLETE status->value.sig = target_signal_from_host (pt.ps_reason); +// OBSOLETE death_by_signal = 0; +// OBSOLETE +// OBSOLETE if (0 == (SIGNALS_DFL_SAFE & sigmask (pt.ps_reason))) +// OBSOLETE { +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE /* else default action of signal is to die */ +// OBSOLETE #ifdef SVR4_SHARED_LIBS +// OBSOLETE rv = ptrace (PT_GET_PRSTATUS, pid, (char *) &pstatus, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE error ("child_wait: signal %d PT_GET_PRSTATUS: %s\n", +// OBSOLETE pt.ps_reason, safe_strerror (errno)); +// OBSOLETE if (pstatus.pr_cursig != pt.ps_reason) +// OBSOLETE { +// OBSOLETE printf ("pstatus signal %d, pt signal %d\n", +// OBSOLETE pstatus.pr_cursig, pt.ps_reason); +// OBSOLETE } +// OBSOLETE sa_hand = (int) pstatus.pr_action.sa_handler; +// OBSOLETE #else +// OBSOLETE saoff = (unsigned long) &u.u_sa[0] - (unsigned long) &u; +// OBSOLETE saoff += sizeof (struct sigaction) * (pt.ps_reason - 1); +// OBSOLETE errno = 0; +// OBSOLETE sa_hand = ptrace (PT_RUSER, pid, (char *) saoff, 0); +// OBSOLETE if (errno) +// OBSOLETE error ("child_wait: signal %d: RUSER: %s\n", +// OBSOLETE pt.ps_reason, safe_strerror (errno)); +// OBSOLETE #endif +// OBSOLETE if ((int) SIG_DFL == sa_hand) +// OBSOLETE { +// OBSOLETE /* we will be dying */ +// OBSOLETE death_by_signal = pt.ps_reason; +// OBSOLETE } +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE +// OBSOLETE } +// OBSOLETE while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */ +// OBSOLETE +// OBSOLETE return pid_to_ptid (pid); +// OBSOLETE } +// OBSOLETE #else /* !ATTACH_DETACH */ +// OBSOLETE /* +// OBSOLETE * Simple child_wait() based on inftarg.c child_wait() for use until +// OBSOLETE * the MPDEBUGGER child_wait() works properly. This will go away when +// OBSOLETE * that is fixed. +// OBSOLETE */ +// OBSOLETE ptid_t +// OBSOLETE child_wait (ptid_t ptid, struct target_waitstatus *ourstatus) +// OBSOLETE { +// OBSOLETE int save_errno; +// OBSOLETE int status; +// OBSOLETE int pid = PIDGET (ptid); +// OBSOLETE +// OBSOLETE do +// OBSOLETE { +// OBSOLETE pid = wait (&status); +// OBSOLETE save_errno = errno; +// OBSOLETE +// OBSOLETE if (pid == -1) +// OBSOLETE { +// OBSOLETE if (save_errno == EINTR) +// OBSOLETE continue; +// OBSOLETE fprintf (stderr, "Child process unexpectedly missing: %s.\n", +// OBSOLETE safe_strerror (save_errno)); +// OBSOLETE ourstatus->kind = TARGET_WAITKIND_SIGNALLED; +// OBSOLETE ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; +// OBSOLETE return pid_to_ptid (-1); +// OBSOLETE } +// OBSOLETE } +// OBSOLETE while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */ +// OBSOLETE store_waitstatus (ourstatus, status); +// OBSOLETE return pid_to_ptid (pid); +// OBSOLETE } +// OBSOLETE #endif /* ATTACH_DETACH */ +// OBSOLETE +// OBSOLETE +// OBSOLETE +// OBSOLETE /* This function simply calls ptrace with the given arguments. +// OBSOLETE It exists so that all calls to ptrace are isolated in this +// OBSOLETE machine-dependent file. */ +// OBSOLETE int +// OBSOLETE call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data) +// OBSOLETE { +// OBSOLETE return ptrace (request, pid, addr, data); +// OBSOLETE } +// OBSOLETE +// OBSOLETE int +// OBSOLETE call_mptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data) +// OBSOLETE { +// OBSOLETE return mptrace (request, pid, addr, data); +// OBSOLETE } +// OBSOLETE +// OBSOLETE #if defined (DEBUG_PTRACE) +// OBSOLETE /* For the rest of the file, use an extra level of indirection */ +// OBSOLETE /* This lets us breakpoint usefully on call_ptrace. */ +// OBSOLETE #define ptrace call_ptrace +// OBSOLETE #define mptrace call_mptrace +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE void +// OBSOLETE kill_inferior (void) +// OBSOLETE { +// OBSOLETE if (ptid_equal (inferior_ptid, null_ptid)) +// OBSOLETE return; +// OBSOLETE +// OBSOLETE /* For MPDEBUGGER, don't use PT_KILL, since the child will stop +// OBSOLETE again with a PTS_EXIT. Just hit him with SIGKILL (so he stops) +// OBSOLETE and detach. */ +// OBSOLETE +// OBSOLETE kill (PIDGET (inferior_ptid), SIGKILL); +// OBSOLETE #ifdef ATTACH_DETACH +// OBSOLETE detach (SIGKILL); +// OBSOLETE #else /* ATTACH_DETACH */ +// OBSOLETE ptrace (PT_KILL, PIDGET (inferior_ptid), 0, 0); +// OBSOLETE wait ((int *) NULL); +// OBSOLETE #endif /* ATTACH_DETACH */ +// OBSOLETE target_mourn_inferior (); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Resume execution of the inferior process. +// OBSOLETE If STEP is nonzero, single-step it. +// OBSOLETE If SIGNAL is nonzero, give it that signal. */ +// OBSOLETE +// OBSOLETE void +// OBSOLETE child_resume (ptid_t ptid, int step, enum target_signal signal) +// OBSOLETE { +// OBSOLETE int pid = PIDGET (ptid); +// OBSOLETE +// OBSOLETE errno = 0; +// OBSOLETE +// OBSOLETE if (pid == -1) +// OBSOLETE pid = PIDGET (inferior_ptid); +// OBSOLETE +// OBSOLETE /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where +// OBSOLETE it was. (If GDB wanted it to start some other way, we have already +// OBSOLETE written a new PC value to the child.) +// OBSOLETE +// OBSOLETE If this system does not support PT_SSTEP, a higher level function will +// OBSOLETE have called single_step() to transmute the step request into a +// OBSOLETE continue request (by setting breakpoints on all possible successor +// OBSOLETE instructions), so we don't have to worry about that here. */ +// OBSOLETE +// OBSOLETE if (step) +// OBSOLETE ptrace (PT_SSTEP, pid, (PTRACE_ARG3_TYPE) 1, signal); +// OBSOLETE else +// OBSOLETE ptrace (PT_CONTSIG, pid, (PTRACE_ARG3_TYPE) 1, signal); +// OBSOLETE +// OBSOLETE if (errno) +// OBSOLETE perror_with_name ("ptrace"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE #ifdef ATTACH_DETACH +// OBSOLETE /* Start debugging the process whose number is PID. */ +// OBSOLETE int +// OBSOLETE attach (int pid) +// OBSOLETE { +// OBSOLETE sigset_t set; +// OBSOLETE int rv; +// OBSOLETE +// OBSOLETE rv = mptrace (XPT_DEBUG, pid, 0, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE error ("mptrace(XPT_DEBUG): %s", safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE rv = mptrace (XPT_SIGNAL, pid, 0, SIGSTOP); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE error ("mptrace(XPT_SIGNAL): %s", safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE attach_flag = 1; +// OBSOLETE return pid; +// OBSOLETE } +// OBSOLETE +// OBSOLETE void +// OBSOLETE detach (int signo) +// OBSOLETE { +// OBSOLETE int rv; +// OBSOLETE +// OBSOLETE rv = mptrace (XPT_UNDEBUG, PIDGET (inferior_ptid), 1, signo); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE error ("mptrace(XPT_UNDEBUG): %s", safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE attach_flag = 0; +// OBSOLETE } +// OBSOLETE +// OBSOLETE #endif /* ATTACH_DETACH */ +// OBSOLETE +// OBSOLETE /* Default the type of the ptrace transfer to int. */ +// OBSOLETE #ifndef PTRACE_XFER_TYPE +// OBSOLETE #define PTRACE_XFER_TYPE int +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE +// OBSOLETE /* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory +// OBSOLETE in the NEW_SUN_PTRACE case. +// OBSOLETE It ought to be straightforward. But it appears that writing did +// OBSOLETE not write the data that I specified. I cannot understand where +// OBSOLETE it got the data that it actually did write. */ +// OBSOLETE +// OBSOLETE /* Copy LEN bytes to or from inferior's memory starting at MEMADDR +// OBSOLETE to debugger memory starting at MYADDR. Copy to inferior if +// OBSOLETE WRITE is nonzero. TARGET is ignored. +// OBSOLETE +// OBSOLETE Returns the length copied, which is either the LEN argument or zero. +// OBSOLETE This xfer function does not do partial moves, since child_ops +// OBSOLETE doesn't allow memory operations to cross below us in the target stack +// OBSOLETE anyway. */ +// OBSOLETE +// OBSOLETE int +// OBSOLETE child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, +// OBSOLETE struct mem_attrib *attrib, +// OBSOLETE struct target_ops *target) +// OBSOLETE { +// OBSOLETE register int i; +// OBSOLETE /* Round starting address down to longword boundary. */ +// OBSOLETE register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE); +// OBSOLETE /* Round ending address up; get number of longwords that makes. */ +// OBSOLETE register int count +// OBSOLETE = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1) +// OBSOLETE / sizeof (PTRACE_XFER_TYPE); +// OBSOLETE /* Allocate buffer of that many longwords. */ +// OBSOLETE /* FIXME (alloca): This code, cloned from infptrace.c, is unsafe +// OBSOLETE because it uses alloca to allocate a buffer of arbitrary size. +// OBSOLETE For very large xfers, this could crash GDB's stack. */ +// OBSOLETE register PTRACE_XFER_TYPE *buffer +// OBSOLETE = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE)); +// OBSOLETE +// OBSOLETE if (write) +// OBSOLETE { +// OBSOLETE /* Fill start and end extra bytes of buffer with existing memory data. */ +// OBSOLETE +// OBSOLETE if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE)) +// OBSOLETE { +// OBSOLETE /* Need part of initial word -- fetch it. */ +// OBSOLETE buffer[0] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr, +// OBSOLETE 0); +// OBSOLETE } +// OBSOLETE +// OBSOLETE if (count > 1) /* FIXME, avoid if even boundary */ +// OBSOLETE { +// OBSOLETE buffer[count - 1] +// OBSOLETE = ptrace (PT_RTEXT, PIDGET (inferior_ptid), +// OBSOLETE ((PTRACE_ARG3_TYPE) +// OBSOLETE (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))), +// OBSOLETE 0); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Copy data to be written over corresponding part of buffer */ +// OBSOLETE +// OBSOLETE memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)), +// OBSOLETE myaddr, +// OBSOLETE len); +// OBSOLETE +// OBSOLETE /* Write the entire buffer. */ +// OBSOLETE +// OBSOLETE for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE)) +// OBSOLETE { +// OBSOLETE errno = 0; +// OBSOLETE ptrace (PT_WDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr, +// OBSOLETE buffer[i]); +// OBSOLETE if (errno) +// OBSOLETE { +// OBSOLETE /* Using the appropriate one (I or D) is necessary for +// OBSOLETE Gould NP1, at least. */ +// OBSOLETE errno = 0; +// OBSOLETE ptrace (PT_WTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr, +// OBSOLETE buffer[i]); +// OBSOLETE } +// OBSOLETE if (errno) +// OBSOLETE return 0; +// OBSOLETE } +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE /* Read all the longwords */ +// OBSOLETE for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE)) +// OBSOLETE { +// OBSOLETE errno = 0; +// OBSOLETE buffer[i] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), +// OBSOLETE (PTRACE_ARG3_TYPE) addr, 0); +// OBSOLETE if (errno) +// OBSOLETE return 0; +// OBSOLETE QUIT; +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Copy appropriate bytes out of the buffer. */ +// OBSOLETE memcpy (myaddr, +// OBSOLETE (char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)), +// OBSOLETE len); +// OBSOLETE } +// OBSOLETE return len; +// OBSOLETE } +// OBSOLETE +// OBSOLETE +// OBSOLETE void +// OBSOLETE _initialize_symm_nat (void) +// OBSOLETE { +// OBSOLETE #ifdef ATTACH_DETACH +// OBSOLETE /* +// OBSOLETE * the MPDEBUGGER is necessary for process tree debugging and attach +// OBSOLETE * to work, but it alters the behavior of debugged processes, so other +// OBSOLETE * things (at least child_wait()) will have to change to accomodate +// OBSOLETE * that. +// OBSOLETE * +// OBSOLETE * Note that attach is not implemented in dynix 3, and not in ptx +// OBSOLETE * until version 2.1 of the OS. +// OBSOLETE */ +// OBSOLETE int rv; +// OBSOLETE sigset_t set; +// OBSOLETE struct sigaction sact; +// OBSOLETE +// OBSOLETE rv = mptrace (XPT_MPDEBUGGER, 0, 0, 0); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE internal_error (__FILE__, __LINE__, +// OBSOLETE "_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s", +// OBSOLETE safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * Under MPDEBUGGER, we get SIGCLHD when a traced process does +// OBSOLETE * anything of interest. +// OBSOLETE */ +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * Block SIGCHLD. We leave it blocked all the time, and then +// OBSOLETE * call sigsuspend() in child_wait() to wait for the child +// OBSOLETE * to do something. None of these ought to fail, but check anyway. +// OBSOLETE */ +// OBSOLETE sigemptyset (&set); +// OBSOLETE rv = sigaddset (&set, SIGCHLD); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE internal_error (__FILE__, __LINE__, +// OBSOLETE "_initialize_symm_nat(): sigaddset(SIGCHLD): %s", +// OBSOLETE safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE rv = sigprocmask (SIG_BLOCK, &set, (sigset_t *) NULL); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE internal_error (__FILE__, __LINE__, +// OBSOLETE "_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s", +// OBSOLETE safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE +// OBSOLETE sact.sa_handler = sigchld_handler; +// OBSOLETE sigemptyset (&sact.sa_mask); +// OBSOLETE sact.sa_flags = SA_NOCLDWAIT; /* keep the zombies away */ +// OBSOLETE rv = sigaction (SIGCHLD, &sact, (struct sigaction *) NULL); +// OBSOLETE if (-1 == rv) +// OBSOLETE { +// OBSOLETE internal_error (__FILE__, __LINE__, +// OBSOLETE "_initialize_symm_nat(): sigaction(SIGCHLD): %s", +// OBSOLETE safe_strerror (errno)); +// OBSOLETE } +// OBSOLETE #endif +// OBSOLETE } diff --git a/gdb/symm-tdep.c b/gdb/symm-tdep.c index 37a2f51..21c8436 100644 --- a/gdb/symm-tdep.c +++ b/gdb/symm-tdep.c @@ -1,102 +1,102 @@ -/* Sequent Symmetry target interface, for GDB. - Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000 - Free Software Foundation, Inc. - - This file is part of GDB. - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* many 387-specific items of use taken from i386-dep.c */ - -#include "defs.h" -#include "frame.h" -#include "inferior.h" -#include "symtab.h" - -#include <signal.h> -#include <sys/param.h> -#include <sys/user.h> -#include <sys/dir.h> -#include <sys/ioctl.h> -#include "gdb_stat.h" -#include "gdbcore.h" -#include <fcntl.h> - -void -symmetry_extract_return_value (struct type *type, char *regbuf, char *valbuf) -{ - union - { - double d; - int l[2]; - } - xd; - struct minimal_symbol *msymbol; - float f; - - if (TYPE_CODE_FLT == TYPE_CODE (type)) - { - msymbol = lookup_minimal_symbol ("1167_flt", NULL, NULL); - if (msymbol != NULL) - { - /* found "1167_flt" means 1167, %fp2-%fp3 */ - /* float & double; 19= %fp2, 20= %fp3 */ - /* no single precision on 1167 */ - xd.l[1] = *((int *) ®buf[REGISTER_BYTE (19)]); - xd.l[0] = *((int *) ®buf[REGISTER_BYTE (20)]); - switch (TYPE_LENGTH (type)) - { - case 4: - /* FIXME: broken for cross-debugging. */ - f = (float) xd.d; - memcpy (valbuf, &f, TYPE_LENGTH (type)); - break; - case 8: - /* FIXME: broken for cross-debugging. */ - memcpy (valbuf, &xd.d, TYPE_LENGTH (type)); - break; - default: - error ("Unknown floating point size"); - break; - } - } - else - { - /* 387 %st(0), gcc uses this */ - i387_to_double (((int *) ®buf[REGISTER_BYTE (3)]), - &xd.d); - switch (TYPE_LENGTH (type)) - { - case 4: /* float */ - f = (float) xd.d; - /* FIXME: broken for cross-debugging. */ - memcpy (valbuf, &f, 4); - break; - case 8: /* double */ - /* FIXME: broken for cross-debugging. */ - memcpy (valbuf, &xd.d, 8); - break; - default: - error ("Unknown floating point size"); - break; - } - } - } - else - { - memcpy (valbuf, regbuf, TYPE_LENGTH (type)); - } -} +// OBSOLETE /* Sequent Symmetry target interface, for GDB. +// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 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 /* many 387-specific items of use taken from i386-dep.c */ +// OBSOLETE +// OBSOLETE #include "defs.h" +// OBSOLETE #include "frame.h" +// OBSOLETE #include "inferior.h" +// OBSOLETE #include "symtab.h" +// OBSOLETE +// OBSOLETE #include <signal.h> +// OBSOLETE #include <sys/param.h> +// OBSOLETE #include <sys/user.h> +// OBSOLETE #include <sys/dir.h> +// OBSOLETE #include <sys/ioctl.h> +// OBSOLETE #include "gdb_stat.h" +// OBSOLETE #include "gdbcore.h" +// OBSOLETE #include <fcntl.h> +// OBSOLETE +// OBSOLETE void +// OBSOLETE symmetry_extract_return_value (struct type *type, char *regbuf, char *valbuf) +// OBSOLETE { +// OBSOLETE union +// OBSOLETE { +// OBSOLETE double d; +// OBSOLETE int l[2]; +// OBSOLETE } +// OBSOLETE xd; +// OBSOLETE struct minimal_symbol *msymbol; +// OBSOLETE float f; +// OBSOLETE +// OBSOLETE if (TYPE_CODE_FLT == TYPE_CODE (type)) +// OBSOLETE { +// OBSOLETE msymbol = lookup_minimal_symbol ("1167_flt", NULL, NULL); +// OBSOLETE if (msymbol != NULL) +// OBSOLETE { +// OBSOLETE /* found "1167_flt" means 1167, %fp2-%fp3 */ +// OBSOLETE /* float & double; 19= %fp2, 20= %fp3 */ +// OBSOLETE /* no single precision on 1167 */ +// OBSOLETE xd.l[1] = *((int *) ®buf[REGISTER_BYTE (19)]); +// OBSOLETE xd.l[0] = *((int *) ®buf[REGISTER_BYTE (20)]); +// OBSOLETE switch (TYPE_LENGTH (type)) +// OBSOLETE { +// OBSOLETE case 4: +// OBSOLETE /* FIXME: broken for cross-debugging. */ +// OBSOLETE f = (float) xd.d; +// OBSOLETE memcpy (valbuf, &f, TYPE_LENGTH (type)); +// OBSOLETE break; +// OBSOLETE case 8: +// OBSOLETE /* FIXME: broken for cross-debugging. */ +// OBSOLETE memcpy (valbuf, &xd.d, TYPE_LENGTH (type)); +// OBSOLETE break; +// OBSOLETE default: +// OBSOLETE error ("Unknown floating point size"); +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE /* 387 %st(0), gcc uses this */ +// OBSOLETE i387_to_double (((int *) ®buf[REGISTER_BYTE (3)]), +// OBSOLETE &xd.d); +// OBSOLETE switch (TYPE_LENGTH (type)) +// OBSOLETE { +// OBSOLETE case 4: /* float */ +// OBSOLETE f = (float) xd.d; +// OBSOLETE /* FIXME: broken for cross-debugging. */ +// OBSOLETE memcpy (valbuf, &f, 4); +// OBSOLETE break; +// OBSOLETE case 8: /* double */ +// OBSOLETE /* FIXME: broken for cross-debugging. */ +// OBSOLETE memcpy (valbuf, &xd.d, 8); +// OBSOLETE break; +// OBSOLETE default: +// OBSOLETE error ("Unknown floating point size"); +// OBSOLETE break; +// OBSOLETE } +// OBSOLETE } +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE memcpy (valbuf, regbuf, TYPE_LENGTH (type)); +// OBSOLETE } +// OBSOLETE } |