aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 3d43406..13f997f 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -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);