* 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.
This commit is contained in:
parent
71918a863f
commit
a6fb9c08a9
7 changed files with 49 additions and 6 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue