Uniquefy gdb.threads/attach-into-signal.exp
[deliverable/binutils-gdb.git] / gdb / p-exp.y
index c214cf1aa909b6cab07a39a6171747e2a7fd3834..5d5c22b6be9e7d33348d41aae280954305c33851 100644 (file)
@@ -596,7 +596,7 @@ exp :       SIZEOF '(' type ')'     %prec UNARY
                          write_exp_elt_type (pstate,
                                            parse_type (pstate)->builtin_int);
                          current_type = parse_type (pstate)->builtin_int;
-                         CHECK_TYPEDEF ($3);
+                         $3 = check_typedef ($3);
                          write_exp_elt_longcst (pstate,
                                                 (LONGEST) TYPE_LENGTH ($3));
                          write_exp_elt_opcode (pstate, OP_LONG); }
@@ -1551,7 +1551,7 @@ yylex (void)
     int is_a_field = 0;
     int hextype;
 
-
+    is_a_field_of_this.type = NULL;
     if (search_field && current_type)
       is_a_field = (lookup_struct_elt_type (current_type, tmp, 1) != NULL);
     if (is_a_field)
@@ -1598,15 +1598,20 @@ yylex (void)
                              VAR_DOMAIN, &is_a_field_of_this);
       }
 
-    if (is_a_field)
+    if (is_a_field || (is_a_field_of_this.type != NULL))
       {
        tempbuf = (char *) realloc (tempbuf, namelen + 1);
        strncpy (tempbuf, tmp, namelen);
        tempbuf [namelen] = 0;
        yylval.sval.ptr = tempbuf;
        yylval.sval.length = namelen;
+       yylval.ssym.sym = NULL;
        free (uptokstart);
-       return FIELDNAME;
+        yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
+       if (is_a_field)
+         return FIELDNAME;
+       else
+         return NAME;
       }
     /* Call lookup_symtab, not lookup_partial_symtab, in case there are
        no psymtabs (coff, xcoff, or some future change to blow away the
@@ -1739,7 +1744,6 @@ yylex (void)
     free(uptokstart);
     /* Any other kind of symbol.  */
     yylval.ssym.sym = sym;
-    yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
     return NAME;
   }
 }
This page took 0.024151 seconds and 4 git commands to generate.