From 940d596798931962895918454d2ca6bd14b83b1b Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Thu, 30 Nov 1995 01:43:37 +0000 Subject: * alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c, findvar.c, hppa-tdep.c, infcmd.c, language.c, printcmd.c, rs6000-tdep.c, symmisc.c, symtab.c: Add check_typedef/CHECK_TYPEDEF as needed. --- gdb/alpha-tdep.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gdb/alpha-tdep.c') diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index ce1c8ed..622ee44 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -729,21 +729,25 @@ alpha_push_arguments (nargs, args, sp, struct_return, struct_addr) for (i = 0, m_arg = alpha_args; i < nargs; i++, m_arg++) { value_ptr arg = args[i]; + struct type *arg_type = check_typedef (VALUE_TYPE (arg)); /* Cast argument to long if necessary as the compiler does it too. */ - switch (TYPE_CODE (VALUE_TYPE (arg))) + switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: case TYPE_CODE_BOOL: case TYPE_CODE_CHAR: case TYPE_CODE_RANGE: case TYPE_CODE_ENUM: - if (TYPE_LENGTH (VALUE_TYPE (arg)) < TYPE_LENGTH (builtin_type_long)) - arg = value_cast (builtin_type_long, arg); + if (TYPE_LENGTH (arg_type) < TYPE_LENGTH (builtin_type_long)) + { + arg_type = builtin_type_long; + arg = value_cast (arg_type, arg); + } break; default: break; } - m_arg->len = TYPE_LENGTH (VALUE_TYPE (arg)); + m_arg->len = TYPE_LENGTH (arg_type); m_arg->offset = accumulate_size; accumulate_size = (accumulate_size + m_arg->len + 7) & ~7; m_arg->contents = VALUE_CONTENTS(arg); -- cgit v1.1