diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-02-05 22:29:06 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-02-05 22:29:06 +0000 |
commit | 021b10e345a1f57758dc522d90e52340a82f71fa (patch) | |
tree | 98a94aefc19abaa803825781a4c7614e81161ee4 /gdb/remote-mips.c | |
parent | 3a0e38ee59290c597fb61f8c681f40f44e931a2e (diff) | |
download | fsf-binutils-gdb-021b10e345a1f57758dc522d90e52340a82f71fa.zip fsf-binutils-gdb-021b10e345a1f57758dc522d90e52340a82f71fa.tar.gz fsf-binutils-gdb-021b10e345a1f57758dc522d90e52340a82f71fa.tar.bz2 |
* remote-mips.c (mips_fetch_registers): If regno is FP_REGNUM or
ZERO_REGNUM, just read it as zero without talking to the board.
Diffstat (limited to 'gdb/remote-mips.c')
-rw-r--r-- | gdb/remote-mips.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index ae793f5..8e926c2 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]; |