From a00dfa360a4115f6f1c698b501018c8a21c020ec Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 23 Jun 1998 18:22:43 +0000 Subject: Tue Jun 23 11:14:04 1998 Michael Snyder * config/mips/tm-irix5.h: Modify to work better on irix 6, by making FP registers 8 bytes instead of 4. REGISTER_BYTES: redefine. REGISTER_BYTE(): redefine. REGISTER_VIRTUAL_TYPE: redefine. MIPS_LAST_ARG_REGNUM: redefine. * irix5-nat.c (fetch_core_registers): read 8 bytes per FP register. * mips-tdep.c (FP_REGISTER_DOUBLE): new macro to distinguish targets with 8-byte FP registers (don't use TARGET_MIPS64). (STACK_ARGSIZE): new macro, how much space is taken up on the stack for each function argument (don't use TARGET_MIPS64). (mips_push_arguments): modify logic to work better on Irix 6 (n32 ABI). --- gdb/irix5-nat.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'gdb/irix5-nat.c') diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index 6ea5dea..88bbf96 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -192,7 +192,8 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) { memcpy ((char *)registers, core_reg_sect, core_reg_size); } - else if (core_reg_size == (2 * REGISTER_BYTES) && MIPS_REGSIZE == 4) + else if (MIPS_REGSIZE == 4 && + core_reg_size == (2 * MIPS_REGSIZE) * NUM_REGS) { /* This is a core file from a N32 executable, 64 bits are saved for all registers. */ @@ -210,7 +211,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) *dstp++ = *srcp++; *dstp++ = *srcp++; *dstp++ = *srcp++; - srcp += 4; + if (REGISTER_RAW_SIZE(regno) == 4) + { + /* copying 4 bytes from eight bytes? + I don't see how this can be right... */ + srcp += 4; + } + else + { + /* copy all 8 bytes (sizeof(double)) */ + *dstp++ = *srcp++; + *dstp++ = *srcp++; + *dstp++ = *srcp++; + *dstp++ = *srcp++; + } } else { -- cgit v1.1