mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
* ada-valprint.c (ada_val_print_1): Eliminate single-use
variable LEN. * alpha-tdep.c (alpha_extract_return_value): Use TYPE_LENGTH directly. (alpha_store_return_value): Likewise. * amd64-tdep.c (amd64_classify_aggregate): Likewise. (amd64_push_arguments): Likewise. * ax-gdb.c (gen_trace_static_fields): Likewise. (gen_traced_pop): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Likewise. * breakpoint.c (update_watchpoint): Likewise. * findcmd.c (parse_find_args): Use local variable for type instead of length. * findvar.c (default_read_var_value): Use TYPE_LENGTH directly. * h8300-tdep.c (h8300h_extract_return_value): Likewise. (h8300_store_return_value): Likewise. * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise. Use i386_darwin_arg_type_alignment directly. * infcall.c (call_function_by_hand): Use TYPE_LENGTH directly. * lm32-tdep.c (lm32_push_dummy_call): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise. (m68hc11_extract_return_value): Likewise. * mep-tdep.c (mep_push_dummy_call): Likewise. * printcmd.c (float_type_from_length): Likewise. * s390-tdep.c (s390_value_from_register): Likewise. * stack.c (read_frame_arg): Likewise. * tracepoint.c (encode_actions_1): Likewise. * valops.c (value_fetch_lazy): Use local variable for type instead of length. Use TYPE_LENGTH directly. * value.c (value_contents_equal): Use TYPE_LENGTH directly.
This commit is contained in:
@@ -446,7 +446,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
|
||||
struct value *v;
|
||||
struct type *type = SYMBOL_TYPE (var);
|
||||
CORE_ADDR addr;
|
||||
int len;
|
||||
|
||||
/* Call check_typedef on our type to make sure that, if TYPE is
|
||||
a TYPE_CODE_TYPEDEF, its length is set to the length of the target type
|
||||
@@ -455,8 +454,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
|
||||
set the returned value type description correctly. */
|
||||
check_typedef (type);
|
||||
|
||||
len = TYPE_LENGTH (type);
|
||||
|
||||
if (symbol_read_needs_frame (var))
|
||||
gdb_assert (frame);
|
||||
|
||||
@@ -465,7 +462,7 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
|
||||
case LOC_CONST:
|
||||
/* Put the constant back in target format. */
|
||||
v = allocate_value (type);
|
||||
store_signed_integer (value_contents_raw (v), len,
|
||||
store_signed_integer (value_contents_raw (v), TYPE_LENGTH (type),
|
||||
gdbarch_byte_order (get_type_arch (type)),
|
||||
(LONGEST) SYMBOL_VALUE (var));
|
||||
VALUE_LVAL (v) = not_lval;
|
||||
@@ -490,7 +487,8 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
|
||||
|
||||
case LOC_CONST_BYTES:
|
||||
v = allocate_value (type);
|
||||
memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), len);
|
||||
memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var),
|
||||
TYPE_LENGTH (type));
|
||||
VALUE_LVAL (v) = not_lval;
|
||||
return v;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user