aboutsummaryrefslogtreecommitdiff
path: root/gdb/irix5-nat.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>1998-06-23 18:22:43 +0000
committerMichael Snyder <msnyder@vmware.com>1998-06-23 18:22:43 +0000
commita00dfa360a4115f6f1c698b501018c8a21c020ec (patch)
tree0ac96080889dcde058518d316e1c8f131382fe1a /gdb/irix5-nat.c
parentebb6416960c0011b7032da235ed0d5986d1d94b8 (diff)
downloadgdb-a00dfa360a4115f6f1c698b501018c8a21c020ec.zip
gdb-a00dfa360a4115f6f1c698b501018c8a21c020ec.tar.gz
gdb-a00dfa360a4115f6f1c698b501018c8a21c020ec.tar.bz2
Tue Jun 23 11:14:04 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* 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).
Diffstat (limited to 'gdb/irix5-nat.c')
-rw-r--r--gdb/irix5-nat.c18
1 files changed, 16 insertions, 2 deletions
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
{