From 021b10e345a1f57758dc522d90e52340a82f71fa Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Sat, 5 Feb 1994 22:29:06 +0000 Subject: [PATCH] * remote-mips.c (mips_fetch_registers): If regno is FP_REGNUM or ZERO_REGNUM, just read it as zero without talking to the board. --- gdb/ChangeLog | 3 +++ gdb/remote-mips.c | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c5b55cc1997..3104fe50d31 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ Sat Feb 5 08:03:41 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + * remote-mips.c (mips_fetch_registers): If regno is FP_REGNUM or + ZERO_REGNUM, just read it as zero without talking to the board. + * config/i386/tm-i386aix.h (REGISTER_CONVERT_TO_RAW): Add missing backslash. * i386-tdep.c (i386_extract_return_value): Pass TYPE_LENGTH (type) diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index ae793f50dfa..8e926c28319 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -1181,10 +1181,18 @@ mips_fetch_registers (regno) return; } - val = mips_request ('r', (unsigned int) mips_map_regno (regno), - (unsigned int) 0, &err, mips_receive_wait); - if (err) - mips_error ("Can't read register %d: %s", regno, safe_strerror (errno)); + if (regno == FP_REGNUM || regno == ZERO_REGNUM) + /* FP_REGNUM on the mips is a hack which is just supposed to read + zero (see also mips-nat.c). */ + val = 0; + else + { + val = mips_request ('r', (unsigned int) mips_map_regno (regno), + (unsigned int) 0, &err, mips_receive_wait); + if (err) + mips_error ("Can't read register %d: %s", regno, + safe_strerror (errno)); + } { char buf[MAX_REGISTER_RAW_SIZE]; -- 2.30.2