From 9cc9d25ec1e90f30c80c00434e614a0b9bd065f0 Mon Sep 17 00:00:00 2001 From: siddhesh Date: Tue, 25 Sep 2012 12:48:52 +0000 Subject: * 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. --- gdb/infcall.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gdb/infcall.c') diff --git a/gdb/infcall.c b/gdb/infcall.c index 1b927484671..2fa1daa88ef 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -708,13 +708,11 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) if (struct_return || hidden_first_param_p) { - int len = TYPE_LENGTH (values_type); - if (gdbarch_inner_than (gdbarch, 1, 2)) { /* Stack grows downward. Align STRUCT_ADDR and SP after making space for the return value. */ - sp -= len; + sp -= TYPE_LENGTH (values_type); if (gdbarch_frame_align_p (gdbarch)) sp = gdbarch_frame_align (gdbarch, sp); struct_addr = sp; @@ -726,7 +724,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) if (gdbarch_frame_align_p (gdbarch)) sp = gdbarch_frame_align (gdbarch, sp); struct_addr = sp; - sp += len; + sp += TYPE_LENGTH (values_type); if (gdbarch_frame_align_p (gdbarch)) sp = gdbarch_frame_align (gdbarch, sp); } -- cgit v1.2.1