* c-exp.y: Revert Kung's change. "..." is not a type, and the
authorJim Kingdon <jkingdon@engr.sgi.com>
Wed, 29 Dec 1993 20:52:06 +0000 (20:52 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Wed, 29 Dec 1993 20:52:06 +0000 (20:52 +0000)
change caused "p (...)0" to dump core.
* gdbtypes.c (check_stub_method): Don't pass "..." to
parse_and_eval_type.  This should fix the bug which Kung was
trying to fix.

gdb/ChangeLog
gdb/c-exp.y
gdb/gdbtypes.c

index 54cb0d1ceba39d1b6f6cd7abda491c2cd99ccc38..d846ad0f35901e0f733104ec7334786784973d08 100644 (file)
@@ -1,5 +1,11 @@
 Wed Dec 29 12:32:08 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * c-exp.y: Revert Kung's change.  "..." is not a type, and the
+       change caused "p (...)0" to dump core.
+       * gdbtypes.c (check_stub_method): Don't pass "..." to
+       parse_and_eval_type.  This should fix the bug which Kung was
+       trying to fix.
+
        * stabsread.c (define_symbol): If we choose not to combine
        two symbols, don't just ignore the second (LOC_REGISTER) one.
        * printcmd.c (print_frame_args): If we have a LOC_ARG and a
index f58424f6abee7d755b3ab8e0ebb381d2ddf69749..ebc1ca66c7142a7fa14d93a9b23612fdf74b964d 100644 (file)
@@ -831,7 +831,6 @@ typebase  /* Implements (approximately): (type-qualifier)* type-specifier */
           be too.  */
        |       CONST_KEYWORD typebase { $$ = $2; }
        |       VOLATILE_KEYWORD typebase { $$ = $2; }
-       |       '.' '.' '.' { $$ = NULL; }
        ;
 
 typename:      TYPENAME
index e361796df8b32e2f259b0634218515a3cde80a36..d1a7da91d7b10c865194a9242fa3294e636b0860 100644 (file)
@@ -989,9 +989,13 @@ check_stub_method (type, i, j)
        {
          if (depth <= 0 && (*p == ',' || *p == ')'))
            {
-             argtypes[argcount] =
-                 parse_and_eval_type (argtypetext, p - argtypetext);
-             argcount += 1;
+             /* Avoid parsing of ellipsis, they will be handled below.  */
+             if (strncmp (argtypetext, "...", p - argtypetext) != 0)
+               {
+                 argtypes[argcount] =
+                     parse_and_eval_type (argtypetext, p - argtypetext);
+                 argcount += 1;
+               }
              argtypetext = p + 1;
            }