aboutsummaryrefslogtreecommitdiff
path: root/gdb/xm-mips.h
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-09-11 09:11:11 +0000
committerJohn Gilmore <gnu@cygnus>1992-09-11 09:11:11 +0000
commit3de61d8c53f4cd0aa568067130b7909c68f79272 (patch)
tree06e9a00b9179528005b985c0a13f2b1b974c3b8d /gdb/xm-mips.h
parenteb54a95a02cd1b0e1a7d96cfb7580c68551b976b (diff)
downloadgdb-3de61d8c53f4cd0aa568067130b7909c68f79272.zip
gdb-3de61d8c53f4cd0aa568067130b7909c68f79272.tar.gz
gdb-3de61d8c53f4cd0aa568067130b7909c68f79272.tar.bz2
* xm-mips.h (KERNEL_U_ADDR): Get from <machine/param.h>.
(REGISTER_U_ADDR): Fix up for Ultrix 4.2. * tm-tahoe.h, xm-tahoe.h (KERNEL_U_ADDR): Move macro to xm-tahoe.h. * stack.c (_initialize_stack): "dow" should be a valid abbreviation for "down". Suggested by Richard Stallman.
Diffstat (limited to 'gdb/xm-mips.h')
-rw-r--r--gdb/xm-mips.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/gdb/xm-mips.h b/gdb/xm-mips.h
index 1318bba..6a8a5bb 100644
--- a/gdb/xm-mips.h
+++ b/gdb/xm-mips.h
@@ -27,7 +27,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define SET_STACK_LIMIT_HUGE
-#define KERNEL_U_ADDR 0 /* Not needed. */
+#ifdef ultrix
+/* Needed for DECstation core files. */
+#include <machine/param.h>
+#define KERNEL_U_ADDR UADDR
+#endif
#ifdef ultrix
extern char *strdup();
@@ -39,11 +43,23 @@ extern void *memcpy();
extern void *memset();
#define MEM_FNS_DECLARED
-/* Only used for core files on DECstations. */
+#if !defined (offsetof)
+# define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+#endif
+
+/* Only used for core files on DECstations.
+ First four registers at u.u_ar0 are saved arguments, and
+ there is no r0 saved. Float registers are saved
+ in u_pcb.pcb_fpregs, not relative to u.u_ar0. */
#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
- else addr = 0; /* ..somewhere in the pcb */
+ { \
+ if (regno < FP0_REGNUM) \
+ addr = blockend + sizeof(int) * (4 + regno - 1); \
+ else \
+ addr = offsetof (struct user, u_pcb.pcb_fpregs[0]) + \
+ sizeof (int) * (regno - FP0_REGNUM); \
+ }
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS