diff options
author | Tom Tromey <tromey@redhat.com> | 2012-07-06 14:48:48 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-07-06 14:48:48 +0000 |
commit | a6fb9c08a9ac65df98ca8829f43083feda19a6fe (patch) | |
tree | 6bda910f53fe801f12d20dd438c721c60ad7bd79 /gdb/eval.c | |
parent | 71918a863fdc11435a0f47a1b3e49bfdf44f6ef5 (diff) | |
download | gdb-a6fb9c08a9ac65df98ca8829f43083feda19a6fe.zip gdb-a6fb9c08a9ac65df98ca8829f43083feda19a6fe.tar.gz gdb-a6fb9c08a9ac65df98ca8829f43083feda19a6fe.tar.bz2 |
* c-exp.y (DOTDOTDOT): New token.
(func_mod, exp): Use parameter_typelist.
(parameter_typelist): New production.
(tokentab3): Add "..." token.
* eval.c (make_params): Handle varargs.
* gdbtypes.c (lookup_function_type_with_arguments): Handle
varargs.
testsuite
* gdb.base/whatis.exp: Add test.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -769,6 +769,11 @@ make_params (int num_types, struct type **param_types) TYPE_CODE (type) = TYPE_CODE_METHOD; TYPE_VPTR_FIELDNO (type) = -1; TYPE_CHAIN (type) = type; + if (num_types > 0 && param_types[num_types - 1] == NULL) + { + --num_types; + TYPE_VARARGS (type) = 1; + } TYPE_NFIELDS (type) = num_types; TYPE_FIELDS (type) = (struct field *) TYPE_ZALLOC (type, sizeof (struct field) * num_types); |