From 1c486a2ba52c43b220e6654b6bc89dae72129540 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Fri, 12 Jan 1996 01:31:37 +0000 Subject: * stabsread.c (define-symbol): Use invisible references for TYPE_CODE_SET and TYPE_CODE_BITSTRING too. * eval.c (evaluate_subexp_standard): When known, use the formal parameter type as the expected type when evaluating arg expressions. * ch-lang.c (evaluate_subexp_chill): Likewise (for MULTI_SUBSCRIPT). This (with a fix to gcc/config/sparc/sparc.h) fixes PR chill/8742. --- gdb/ch-lang.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdb/ch-lang.c') diff --git a/gdb/ch-lang.c b/gdb/ch-lang.c index a76ae46..9988a3c 100644 --- a/gdb/ch-lang.c +++ b/gdb/ch-lang.c @@ -424,6 +424,17 @@ evaluate_subexp_chill (expect_type, exp, pos, noside) argvec = (value_ptr *) alloca (sizeof (value_ptr) * (nargs + 2)); argvec[0] = arg1; tem = 1; + if (type && TYPE_CODE (type) == TYPE_CODE_PTR) + type = check_typedef (TYPE_TARGET_TYPE (type)); + if (type && TYPE_CODE (type) == TYPE_CODE_FUNC) + { + for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++) + { + argvec[tem] + = evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem-1), + exp, pos, noside); + } + } for (; tem <= nargs; tem++) argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside); argvec[tem] = 0; /* signal end of arglist */ -- cgit v1.1