diff options
author | Tom Tromey <tromey@redhat.com> | 2012-12-14 17:47:40 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-12-14 17:47:40 +0000 |
commit | 1993b71979c5e9cb66b067abfcb003b5d5cdab03 (patch) | |
tree | c8b48b6de6e818a6875b2765e1f0e0c9b0391f86 /gdb/p-exp.y | |
parent | 2dc3df72a7ffca9a893ae41db8c3788c0019d59c (diff) | |
download | binutils-1993b71979c5e9cb66b067abfcb003b5d5cdab03.zip binutils-1993b71979c5e9cb66b067abfcb003b5d5cdab03.tar.gz binutils-1993b71979c5e9cb66b067abfcb003b5d5cdab03.tar.bz2 |
* c-exp.y (block, variable, name_not_typename, lex_one_token,
classify_name): Update.
* c-valprint.c (c_val_print): Update.
* f-exp.y (yylex): Update.
* go-exp.y (package_name_p, classify_packaged_name)
(classify_name): Update.
* jv-exp.y (push_variable): Update.
* m2-exp.y (variable): Update.
* mi/mi-cmd-stack.c (list_args_or_locals): Update.
* p-exp.y (block, variable, yylex): Update.
* p-valprint.c (pascal_val_print): Update.
* parse.c (write_dollar_variable): Update.
* printcmd.c (address_info): Update.
* python/py-symbol.c (gdbpy_lookup_symbol): Update.
* symtab.c (lookup_symbol_aux, lookup_symbol_in_language)
(lookup_symbol): Change type of 'is_a_field_of_this'.
(check_field): Add 'is_a_field_of_this' argument.
* symtab.h (struct field_of_this_result): New.
(lookup_symbol, lookup_symbol_in_language): Update.
Diffstat (limited to 'gdb/p-exp.y')
-rw-r--r-- | gdb/p-exp.y | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/p-exp.y b/gdb/p-exp.y index 4c0cc57..dc57664 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -658,7 +658,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL); + VAR_DOMAIN, NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error (_("No function \"%s\" in specified context."), copy_name ($3)); @@ -668,7 +668,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL); + VAR_DOMAIN, NULL); if (sym == 0) error (_("No symbol \"%s\" in specified context."), copy_name ($3)); @@ -704,7 +704,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_DOMAIN, (int *) NULL); + VAR_DOMAIN, NULL); if (sym) { write_exp_elt_opcode (OP_VAR_VALUE); @@ -1483,7 +1483,7 @@ yylex (void) static const char this_name[] = "this"; if (lookup_symbol (this_name, expression_context_block, - VAR_DOMAIN, (int *) NULL)) + VAR_DOMAIN, NULL)) { free (uptokstart); return THIS; @@ -1522,7 +1522,7 @@ yylex (void) { char *tmp = copy_name (yylval.sval); struct symbol *sym; - int is_a_field_of_this = 0; + struct field_of_this_result is_a_field_of_this; int is_a_field = 0; int hextype; @@ -1535,7 +1535,7 @@ yylex (void) sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, &is_a_field_of_this); /* second chance uppercased (as Free Pascal does). */ - if (!sym && !is_a_field_of_this && !is_a_field) + if (!sym && is_a_field_of_this.type == NULL && !is_a_field) { for (i = 0; i <= namelen; i++) { @@ -1549,7 +1549,7 @@ yylex (void) else sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, &is_a_field_of_this); - if (sym || is_a_field_of_this || is_a_field) + if (sym || is_a_field_of_this.type != NULL || is_a_field) for (i = 0; i <= namelen; i++) { if ((tokstart[i] >= 'a' && tokstart[i] <= 'z')) @@ -1557,7 +1557,7 @@ yylex (void) } } /* Third chance Capitalized (as GPC does). */ - if (!sym && !is_a_field_of_this && !is_a_field) + if (!sym && is_a_field_of_this.type == NULL && !is_a_field) { for (i = 0; i <= namelen; i++) { @@ -1577,7 +1577,7 @@ yylex (void) else sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, &is_a_field_of_this); - if (sym || is_a_field_of_this || is_a_field) + if (sym || is_a_field_of_this.type != NULL || is_a_field) for (i = 0; i <= namelen; i++) { if (i == 0) @@ -1607,7 +1607,7 @@ yylex (void) || lookup_symtab (tmp)) { yylval.ssym.sym = sym; - yylval.ssym.is_a_field_of_this = is_a_field_of_this; + yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL; free (uptokstart); return BLOCKNAME; } @@ -1673,7 +1673,7 @@ yylex (void) memcpy (tmp1, namestart, p - namestart); tmp1[p - namestart] = '\0'; cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_DOMAIN, (int *) NULL); + VAR_DOMAIN, NULL); if (cur_sym) { if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF) @@ -1722,7 +1722,7 @@ yylex (void) if (hextype == INT) { yylval.ssym.sym = sym; - yylval.ssym.is_a_field_of_this = is_a_field_of_this; + yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL; free (uptokstart); return NAME_OR_INT; } @@ -1731,7 +1731,7 @@ 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; + yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL; return NAME; } } |