diff --git a/gdb/coredep.c b/gdb/coredep.c index 81fb3a42d50..6eec85a1075 100644 --- a/gdb/coredep.c +++ b/gdb/coredep.c @@ -25,9 +25,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gdbcore.h" #include -/* Some of these are needed on various systems, perhaps, to expand - REGISTER_U_ADDR appropriately? */ -/* #include */ +/* These are needed on various systems to expand REGISTER_U_ADDR. */ +#include #include #include #include diff --git a/gdb/xm-mips.h b/gdb/xm-mips.h index 29d523e4823..4b5eb5fd8d7 100644 --- a/gdb/xm-mips.h +++ b/gdb/xm-mips.h @@ -23,18 +23,18 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define HOST_BYTE_ORDER LITTLE_ENDIAN #endif -/* wait.h */ -#define HAVE_WAIT_STRUCT - /* Get rid of any system-imposed stack limit if possible */ #define SET_STACK_LIMIT_HUGE /* This WOULD BE the amount to subtract from u.u_ar0 to get the offset in the core file of the register values. - But Mips' ptrace works on regnums, not displacements */ + But Mips' ptrace works on regnums, not displacements. So since + REGISTER_U_ADDR is called for both core files and ptrace, use + BLOCKEND as a flag: 0 for core files, 1 for ptrace. What a + kludge. */ -#define KERNEL_U_ADDR (int)u.u_ar0 +#define KERNEL_U_ADDR (int)reg_ptr /* Magic, causes a zero blockend */ #define REGISTER_U_ADDR(addr, blockend, regno) \ if (blockend == 0) { \ @@ -55,7 +55,3 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */ #define ONE_PROCESS_WRITETEXT - -/* Interface definitions for kernel debugger KDB */ - -/* I am not going to pretend I've done anything about this */