aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2000-06-12 14:39:14 +0000
committerFernando Nasser <fnasser@redhat.com>2000-06-12 14:39:14 +0000
commit8903de4f9cca685b345841a497dfd42a8f42e19e (patch)
treec4f2ef0fc59306e43b08eabddd7f426432620b93 /gdb/valops.c
parent34e924c0665d359ed95eda418be085e2c49a1e7c (diff)
downloadgdb-8903de4f9cca685b345841a497dfd42a8f42e19e.zip
gdb-8903de4f9cca685b345841a497dfd42a8f42e19e.tar.gz
gdb-8903de4f9cca685b345841a497dfd42a8f42e19e.tar.bz2
2000-06-12 Fernando Nasser <fnasser@cygnus.com>
* valops.c (value_assign): Adjust the length to take into consideration that we are not starting from the beginning.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index c84e7a7..16241bf 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -660,7 +660,8 @@ value_assign (toval, fromval)
if (VALUE_BITSIZE (toval))
{
char buffer[sizeof (LONGEST)];
- int len = REGISTER_RAW_SIZE (VALUE_REGNO (toval));
+ int len =
+ REGISTER_RAW_SIZE (VALUE_REGNO (toval)) - VALUE_OFFSET (toval);
if (len > (int) sizeof (LONGEST))
error ("Can't handle bitfields in registers larger than %d bits.",