mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-03 04:01:22 +08: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:
11
gdb/stack.c
11
gdb/stack.c
@ -354,14 +354,15 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
|
||||
|
||||
if (val && entryval && !ui_out_is_mi_like_p (current_uiout))
|
||||
{
|
||||
unsigned len = TYPE_LENGTH (value_type (val));
|
||||
struct type *type = value_type (val);
|
||||
|
||||
if (!value_optimized_out (val) && value_lazy (val))
|
||||
value_fetch_lazy (val);
|
||||
if (!value_optimized_out (val) && value_lazy (entryval))
|
||||
value_fetch_lazy (entryval);
|
||||
if (!value_optimized_out (val)
|
||||
&& value_available_contents_eq (val, 0, entryval, 0, len))
|
||||
&& value_available_contents_eq (val, 0, entryval, 0,
|
||||
TYPE_LENGTH (type)))
|
||||
{
|
||||
/* Initialize it just to avoid a GCC false warning. */
|
||||
struct value *val_deref = NULL, *entryval_deref;
|
||||
@ -373,12 +374,12 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
|
||||
|
||||
TRY_CATCH (except, RETURN_MASK_ERROR)
|
||||
{
|
||||
unsigned len_deref;
|
||||
struct type *type_deref;
|
||||
|
||||
val_deref = coerce_ref (val);
|
||||
if (value_lazy (val_deref))
|
||||
value_fetch_lazy (val_deref);
|
||||
len_deref = TYPE_LENGTH (value_type (val_deref));
|
||||
type_deref = value_type (val_deref);
|
||||
|
||||
entryval_deref = coerce_ref (entryval);
|
||||
if (value_lazy (entryval_deref))
|
||||
@ -389,7 +390,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
|
||||
if (val != val_deref
|
||||
&& value_available_contents_eq (val_deref, 0,
|
||||
entryval_deref, 0,
|
||||
len_deref))
|
||||
TYPE_LENGTH (type_deref)))
|
||||
val_equal = 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user