summaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 3a5ac0fe8b0..75995ac9f6b 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -994,7 +994,6 @@ value_fetch_lazy (struct value *val)
struct value *parent = value_parent (val);
LONGEST offset = value_offset (val);
LONGEST num;
- int length = TYPE_LENGTH (type);
if (!value_bits_valid (val,
TARGET_CHAR_BIT * offset + value_bitpos (val),
@@ -1008,19 +1007,20 @@ value_fetch_lazy (struct value *val)
value_bitsize (val), parent, &num))
mark_value_bytes_unavailable (val,
value_embedded_offset (val),
- length);
+ TYPE_LENGTH (type));
else
- store_signed_integer (value_contents_raw (val), length,
+ store_signed_integer (value_contents_raw (val), TYPE_LENGTH (type),
byte_order, num);
}
else if (VALUE_LVAL (val) == lval_memory)
{
CORE_ADDR addr = value_address (val);
- int length = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
+ struct type *type = check_typedef (value_enclosing_type (val));
- if (length)
+ if (TYPE_LENGTH (type))
read_value_memory (val, 0, value_stack (val),
- addr, value_contents_all_raw (val), length);
+ addr, value_contents_all_raw (val),
+ TYPE_LENGTH (type));
}
else if (VALUE_LVAL (val) == lval_register)
{