diff options
author | Fred Fish <fnf@specifix.com> | 1993-11-22 19:08:33 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1993-11-22 19:08:33 +0000 |
commit | abab73c4ddf5c40b730b774f698421f76804d9c9 (patch) | |
tree | c6a8a348dde928a07fcb80839fd2a8c70c79a195 /gdb/m88k-nat.c | |
parent | c236d8b3a5c43004e189ea6f9e04708f5463df54 (diff) | |
download | gdb-abab73c4ddf5c40b730b774f698421f76804d9c9.zip gdb-abab73c4ddf5c40b730b774f698421f76804d9c9.tar.gz gdb-abab73c4ddf5c40b730b774f698421f76804d9c9.tar.bz2 |
* gdb/config/m88k/delta88.mh (NATDEPFILES): Added corelow.o and
coredep.o to this list.
* gdb/m88k-nat.c (m88k_register_u_addr): Avoid error when passed
the number for an M88110 extended register by just returning the
address of r0.
Diffstat (limited to 'gdb/m88k-nat.c')
-rw-r--r-- | gdb/m88k-nat.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/m88k-nat.c b/gdb/m88k-nat.c index 619d865..b574651 100644 --- a/gdb/m88k-nat.c +++ b/gdb/m88k-nat.c @@ -218,7 +218,13 @@ m88k_register_u_addr (blockend, regnum) case SXIP_REGNUM: return (ustart + SXIP_OFFSET); case SNIP_REGNUM: return (ustart + SNIP_OFFSET); case SFIP_REGNUM: return (ustart + SFIP_OFFSET); - default: return (blockend + sizeof (REGISTER_TYPE) * regnum); + default: + if (regnum < NUM_REGS) + /* The register is one of those which is not defined... + give it zero */ + return (ustart + ((int) &u.pt_r0 - (int) &u)); + else + return (blockend + sizeof (REGISTER_TYPE) * regnum); } } |