diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/findvar.c | 17 |
2 files changed, 20 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1e28508..6d2fd2f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 8 08:22:05 1993 Doug Evans (dje@canuck.cygnus.com) + + * findvar.c (read_register): Provide some support for 64 bit regs. + (write_register): Ditto. + Wed Jul 7 14:30:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config/mips/nm-riscos.h: machine/machparam.h is always the right diff --git a/gdb/findvar.c b/gdb/findvar.c index 214870c..e382405 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -306,6 +306,7 @@ read_register (regno) unsigned short sval; unsigned int ival; unsigned long lval; + LONGEST llval; int size; @@ -334,6 +335,12 @@ read_register (regno) SWAP_TARGET_AND_HOST (&lval, sizeof (lval)); return lval; } + else if (size == sizeof (llval)) + { + memcpy (&llval, ®isters[REGISTER_BYTE (regno)], sizeof (llval)); + SWAP_TARGET_AND_HOST (&llval, sizeof (llval)); + return llval; + } else { error ("GDB Internal Error in read_register() for register %d, size %d", @@ -358,6 +365,7 @@ write_register (regno, val) unsigned short sval; unsigned int ival; unsigned long lval; + LONGEST llval; int size; PTR ptr; @@ -391,15 +399,20 @@ write_register (regno, val) ptr = (PTR) &lval; lval = val; } - else + else if (size == sizeof(llval)) + { + ptr = (PTR) &llval; + llval = val; + } + else { error ("GDB Internal Error in write_register() for register %d, size %d", regno, size); } + SWAP_TARGET_AND_HOST (ptr, size); if (register_valid [regno]) { - SWAP_TARGET_AND_HOST (ptr, size); if (memcmp (®isters[REGISTER_BYTE (regno)], ptr, size) == 0) return; |