aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-10-12 07:11:48 +0000
committerJohn Gilmore <gnu@cygnus>1991-10-12 07:11:48 +0000
commitdf6335e19f0b678f5c3842cb91e1373b1f27eafc (patch)
tree717720a5cbf7a85b2c11156a1b6a2d9565070b45
parent96eb46258b717266ddef1f850be124c6925a8a3f (diff)
downloadgdb-df6335e19f0b678f5c3842cb91e1373b1f27eafc.zip
gdb-df6335e19f0b678f5c3842cb91e1373b1f27eafc.tar.gz
gdb-df6335e19f0b678f5c3842cb91e1373b1f27eafc.tar.bz2
* tm-{irix3,mips,nindy960,pn,symmetry,vx960}.h: Move
REGISTER_U_ADDR to corresponding xm- file. Sugg. by Peter Schauer.
-rw-r--r--gdb/tm-irix3.h8
-rw-r--r--gdb/tm-mips.h14
-rw-r--r--gdb/tm-nindy960.h5
-rw-r--r--gdb/tm-pn.h11
-rw-r--r--gdb/tm-symmetry.h98
-rw-r--r--gdb/tm-vx960.h11
-rw-r--r--gdb/xm-irix3.h10
-rw-r--r--gdb/xm-mips.h14
-rw-r--r--gdb/xm-pn.h14
-rw-r--r--gdb/xm-symmetry.h97
10 files changed, 133 insertions, 149 deletions
diff --git a/gdb/tm-irix3.h b/gdb/tm-irix3.h
index 35440e5..63460a3 100644
--- a/gdb/tm-irix3.h
+++ b/gdb/tm-irix3.h
@@ -125,14 +125,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define DO_REGISTERS_INFO(_regnum, fp) mips_do_registers_info(_regnum, fp)
-#define U_REGS_OFFSET 0
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < PC_REGNUM) \
- addr = regno; \
- else \
- addr = regno + NSIG_HNDLRS; /* Skip over signal handlers */
-
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES (NUM_REGS*4)
diff --git a/gdb/tm-mips.h b/gdb/tm-mips.h
index b57b04a..7eb7f55 100644
--- a/gdb/tm-mips.h
+++ b/gdb/tm-mips.h
@@ -136,20 +136,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define DO_REGISTERS_INFO(_regnum, fp) mips_do_registers_info(_regnum, fp)
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (blockend == 0) { \
- if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
- else addr = 0; /* ..somewhere in the pcb */ \
- } else if (regno < 32) addr = regno; \
- else if (regno == PC_REGNUM) addr = 96; \
- else if (regno == 36) addr = 97; \
- else if (regno == HI_REGNUM) addr = 98; \
- else if (regno == LO_REGNUM) addr = 99; \
- else if (regno == FCRCS_REGNUM) addr = 100; \
- else if (regno == FCRIR_REGNUM) addr = 101; \
- else if (regno >= FP0_REGNUM) addr = regno - (FP0_REGNUM-32);\
- else addr = 0;
-
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES (NUM_REGS*4)
diff --git a/gdb/tm-nindy960.h b/gdb/tm-nindy960.h
index 24dfea9..36a24fd 100644
--- a/gdb/tm-nindy960.h
+++ b/gdb/tm-nindy960.h
@@ -98,8 +98,3 @@ extern int nindy_frame_chain_valid(); /* See nindy-tdep.c */
*/
#define DECR_PC_AFTER_BREAK 0
-
-/* Not needed, because we don't support core files:
- * #define KERNEL_U_ADDR
- * #define REGISTER_U_ADDR(addr, blockend, regno)
- */
diff --git a/gdb/tm-pn.h b/gdb/tm-pn.h
index 980def7..1c2e77a 100644
--- a/gdb/tm-pn.h
+++ b/gdb/tm-pn.h
@@ -229,17 +229,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define PS_REGNUM 17 /* Contains processor status */
#define PC_REGNUM 18 /* Contains program counter */
-/* This is a piece of magic that is given a register number REGNO
- and as BLOCKEND the address in the system of the end of the user structure
- and stores in ADDR the address in the kernel or core dump
- of that register. */
-#define REGISTER_U_ADDR(addr, blockend, regno) { \
- addr = blockend + regno * 4; \
- if (regno == PC_REGNUM) addr = blockend - 8 * 4; \
- if (regno == PS_REGNUM) addr = blockend - 7 * 4; \
- if (regno == SP_REGNUM) addr = blockend - 6 * 4; \
-}
-
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES (NUM_GEN_REGS*4 + NUM_CPU_REGS*4)
diff --git a/gdb/tm-symmetry.h b/gdb/tm-symmetry.h
index f5a8aca..41d6db9 100644
--- a/gdb/tm-symmetry.h
+++ b/gdb/tm-symmetry.h
@@ -131,104 +131,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 */
diff --git a/gdb/tm-vx960.h b/gdb/tm-vx960.h
index 7d1c61f..f6a5e1f 100644
--- a/gdb/tm-vx960.h
+++ b/gdb/tm-vx960.h
@@ -35,14 +35,3 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Breakpoint patching is handled at the target end in VxWorks. */
/* #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} */
-
-/* Not needed, because we don't support core files:
- #define KERNEL_U_ADDR
- #define REGISTER_U_ADDR(addr, blockend, regno)
- */
-
-/* Address of end of stack space.
- This doesn't matter for VxWorks, because it's only used
- in manipulation of core files, which we don't support. */
-
-/* #define STACK_END_ADDR (0xfe000000) */
diff --git a/gdb/xm-irix3.h b/gdb/xm-irix3.h
index ce934c9..e155a41 100644
--- a/gdb/xm-irix3.h
+++ b/gdb/xm-irix3.h
@@ -20,7 +20,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define HAVE_TERMIO
+#define U_REGS_OFFSET 0
+
#include "xm-bigmips.h"
+/* Override register locations in upage for SGI machines */
+#undef REGISTER_U_ADDR
+#define REGISTER_U_ADDR(addr, blockend, regno) \
+ if (regno < PC_REGNUM) \
+ addr = regno; \
+ else \
+ addr = regno + NSIG_HNDLRS; /* Skip over signal handlers */
+
/* Don't need special routines for the SGI -- we can use infptrace.c */
#undef FETCH_INFERIOR_REGISTERS
diff --git a/gdb/xm-mips.h b/gdb/xm-mips.h
index caebda5..29d523e 100644
--- a/gdb/xm-mips.h
+++ b/gdb/xm-mips.h
@@ -36,6 +36,20 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define KERNEL_U_ADDR (int)u.u_ar0
+#define REGISTER_U_ADDR(addr, blockend, regno) \
+ if (blockend == 0) { \
+ if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
+ else addr = 0; /* ..somewhere in the pcb */ \
+ } else if (regno < 32) addr = regno; \
+ else if (regno == PC_REGNUM) addr = 96; \
+ else if (regno == 36) addr = 97; \
+ else if (regno == HI_REGNUM) addr = 98; \
+ else if (regno == LO_REGNUM) addr = 99; \
+ else if (regno == FCRCS_REGNUM) addr = 100; \
+ else if (regno == FCRIR_REGNUM) addr = 101; \
+ else if (regno >= FP0_REGNUM) addr = regno - (FP0_REGNUM-32);\
+ else addr = 0;
+
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/xm-pn.h b/gdb/xm-pn.h
index 1cb7602..d180b6e 100644
--- a/gdb/xm-pn.h
+++ b/gdb/xm-pn.h
@@ -26,9 +26,19 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Address of U in kernel space */
#define KERNEL_U_ADDR 0x3fc000
+
+/* This is a piece of magic that is given a register number REGNO
+ and as BLOCKEND the address in the system of the end of the user structure
+ and stores in ADDR the address in the kernel or core dump
+ of that register. */
+#define REGISTER_U_ADDR(addr, blockend, regno) { \
+ addr = blockend + regno * 4; \
+ if (regno == PC_REGNUM) addr = blockend - 8 * 4; \
+ if (regno == PS_REGNUM) addr = blockend - 7 * 4; \
+ if (regno == SP_REGNUM) addr = blockend - 6 * 4; \
+}
-/*
- * No KDB support, Yet! */
+/* No KDB support, Yet! */
/* Interface definitions for kernel debugger KDB. */
/* Map machine fault codes into signal numbers.
diff --git a/gdb/xm-symmetry.h b/gdb/xm-symmetry.h
index f229dad..4e1aeac 100644
--- a/gdb/xm-symmetry.h
+++ b/gdb/xm-symmetry.h
@@ -41,6 +41,103 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
+/* 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); \
+ } \
+}
+
/* Compensate for lack of `vprintf' function. */
#define MISSING_VPRINTF