aboutsummaryrefslogtreecommitdiff
path: root/gdb/ch-lang.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1996-01-12 01:31:37 +0000
committerPer Bothner <per@bothner.com>1996-01-12 01:31:37 +0000
commit1c486a2ba52c43b220e6654b6bc89dae72129540 (patch)
tree242515cf3ba4d4158b569d99286cef942ce1b618 /gdb/ch-lang.c
parent71897943c416613a8186d7063b38f0725256cb37 (diff)
downloadgdb-1c486a2ba52c43b220e6654b6bc89dae72129540.zip
gdb-1c486a2ba52c43b220e6654b6bc89dae72129540.tar.gz
gdb-1c486a2ba52c43b220e6654b6bc89dae72129540.tar.bz2
* 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.
Diffstat (limited to 'gdb/ch-lang.c')
-rw-r--r--gdb/ch-lang.c11
1 files changed, 11 insertions, 0 deletions
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 */