aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1993-07-08 15:27:23 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1993-07-08 15:27:23 +0000
commitbe474657518dd3253c668ff0380e60af67d9df85 (patch)
treeee279674f2ae20925b7dfb58929128d3970e26a3 /gdb
parent422069965b94b425a64ce38593b294701a7e109f (diff)
downloadgdb-be474657518dd3253c668ff0380e60af67d9df85.zip
gdb-be474657518dd3253c668ff0380e60af67d9df85.tar.gz
gdb-be474657518dd3253c668ff0380e60af67d9df85.tar.bz2
* findvar.c (read_register): Provide some support for 64 bit regs.
(write_register): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/findvar.c17
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, &registers[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 (&registers[REGISTER_BYTE (regno)],
ptr, size) == 0)
return;