* tm-rs6000.h (AIX_BUGGY_PTRACE_CALL): Zap, we think we fixed it.
[deliverable/binutils-gdb.git] / gdb / tm-symmetry.h
index f5a8acaac450218353ef0e6d19e7c24652be1e8c..389d4eb32a768de30e7a042a15735e0ba18a0fea 100644 (file)
@@ -1,6 +1,7 @@
-/* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0,
+/* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0,
    with Weitek 1167 and i387 support.
-   Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
+   Symmetry version by Jay Vosburgh (uunet!sequent!fubar).
 
 This file is part of GDB.
 
@@ -18,8 +19,6 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-/* Symmetry version by Jay Vosburgh (uunet!sequent!fubar) */
-
 /* 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>
@@ -31,10 +30,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define NAMES_HAVE_UNDERSCORE
 
-/* Debugger information will be in DBX format.  */
-
-#define READ_DBX_FORMAT
-
 /* Offset from address of function to start of its code.
    Zero on most machines.  */
 
@@ -45,6 +40,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define SKIP_PROLOGUE(frompc)   {(frompc) = i386_skip_prologue((frompc));}
 
+extern int
+i386_skip_prologue PARAMS ((int));
+
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
    the new frame is not set up until the new function executes
@@ -131,104 +129,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define PC_REGNUM 16           /* Contains program counter */
 #define PS_REGNUM 17           /* Contains processor status */
 
-/* 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 = blockend - \
-         ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \
-      break; \
-  case 4:                      /* st(1) */ \
-      addr = blockend - \
-         ((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 = blockend - \
-         ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \
-      break; \
-  case 9:                      /* st(3) */ \
-      addr = blockend - \
-         ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \
-      break; \
-  case 10:                     /* st(4) */ \
-      addr = blockend - \
-         ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \
-      break; \
-  case 11:                     /* st(5) */ \
-      addr = blockend - \
-         ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \
-      break; \
-  case 12:                     /* st(6) */ \
-      addr = blockend - \
-         ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \
-      break; \
-  case 13:                     /* st(7) */ \
-      addr = blockend - \
-         ((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 = blockend - \
-        ((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 i386 registers, 8 i387 registers, and 31 Weitek 1167 registers */
@@ -289,6 +189,9 @@ switch (regno) { \
 (REGNUM < 14) ? i387_to_double((FROM), (TO)) : \
     bcopy ((FROM), (TO), 4))
 
+extern void
+i387_to_double PARAMS ((char *, char *));
+
 /* Convert data from virtual format for register REGNUM
    to raw format for register REGNUM.  */
 
@@ -299,6 +202,9 @@ switch (regno) { \
 (REGNUM < 14) ? double_to_i387((FROM), (TO)) : \
     bcopy ((FROM), (TO), 4))
 
+extern void
+double_to_i387 PARAMS ((char *, char *));
+
 /* Return the GDB type object for the "standard" data type
    of data in register N.  */
 
@@ -344,27 +250,20 @@ switch (regno) { \
 /* FRAME_CHAIN takes a frame's nominal address
    and produces the frame's chain-pointer.
 
-   FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
-   and produces the nominal address of the caller frame.
-
    However, if FRAME_CHAIN_VALID returns zero,
-   it means the given frame is the outermost one and has no caller.
-   In that case, FRAME_CHAIN_COMBINE is not used.  */
+   it means the given frame is the outermost one and has no caller.  */
 
 /* On Symmetry, %ebp points to caller's %ebp, and the return address
-   is right on top of that.
-*/
+   is right on top of that.  */
 
 #define FRAME_CHAIN(thisframe)  \
-  (outside_startup_file ((thisframe)->pc) ? \
+  (!inside_entry_file ((thisframe)->pc) ? \
    read_memory_integer((thisframe)->frame, 4) :\
    0)
 
 #define FRAME_CHAIN_VALID(chain, thisframe) \
   (chain != 0)
 
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
 /* Define other aspects of the stack frame.  */
 
 /* A macro that tells us whether the function invocation represented
@@ -423,6 +322,15 @@ switch (regno) { \
 #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
 { i386_frame_find_saved_regs ((frame_info), &(frame_saved_regs)); }
 
+#ifdef __STDC__                /* Forward decl's for prototypes */
+struct frame_info;
+struct frame_saved_regs;
+#endif
+
+extern void
+i386_frame_find_saved_regs PARAMS ((struct frame_info *,
+                                   struct frame_saved_regs *));
+
 \f
 /* Things needed for making the inferior call functions.  */
 
@@ -486,3 +394,9 @@ switch (regno) { \
        delta = to - from; \
        *(int *)((char *)(dummyname) + 1) = delta; \
 }
+
+extern void
+print_387_control_word PARAMS ((unsigned int));
+
+extern void
+print_387_status_word PARAMS ((unsigned int));
This page took 0.024746 seconds and 4 git commands to generate.