aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-07 20:05:15 +0000
committerTom Tromey <tromey@redhat.com>2012-12-07 20:05:15 +0000
commit155da5173d74221a3099c22c27de1e8e2214982b (patch)
tree2d9b79cc51defeda92a300138d8a020590a1b0f4 /gdb/parse.c
parent4fc5d43ea6b0f1ae45c2819f9b15d2cafe2f27b7 (diff)
downloadgdb-155da5173d74221a3099c22c27de1e8e2214982b.zip
gdb-155da5173d74221a3099c22c27de1e8e2214982b.tar.gz
gdb-155da5173d74221a3099c22c27de1e8e2214982b.tar.bz2
* expression.h (parse_expression_for_completion): Rename
from parse_field_expression. (parse_completion): Rename from in_parse_field. * c-exp.y (lex_one_token): Update. * completer.c (expression_completer): Update. * go-exp.y (lex_one_token): Update. * p-exp.y (yylex): Update. * parse.c (parse_completion): Rename from in_parse_field. (parse_exp_in_context): Update. (parse_expression_for_completion): Rename from parse_field_expression. Update.
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index 0392c6a..984c0d2 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -81,9 +81,8 @@ char *prev_lexptr;
int paren_depth;
int comma_terminates;
-/* True if parsing an expression to find a field reference. This is
- only used by completion. */
-int in_parse_field;
+/* True if parsing an expression to attempt completion. */
+int parse_completion;
/* The index of the last struct expression directly before a '.' or
'->'. This is set when parsing and is only used when completing a
@@ -1191,7 +1190,7 @@ parse_exp_in_context (char **stringptr, CORE_ADDR pc, const struct block *block,
}
if (except.reason < 0)
{
- if (! in_parse_field)
+ if (! parse_completion)
{
xfree (expout);
throw_exception (except);
@@ -1245,7 +1244,7 @@ parse_expression (char *string)
*NAME must be freed by the caller. */
struct type *
-parse_field_expression (char *string, char **name)
+parse_expression_for_completion (char *string, char **name)
{
struct expression *exp = NULL;
struct value *val;
@@ -1254,10 +1253,10 @@ parse_field_expression (char *string, char **name)
TRY_CATCH (except, RETURN_MASK_ERROR)
{
- in_parse_field = 1;
+ parse_completion = 1;
exp = parse_exp_in_context (&string, 0, 0, 0, 0, &subexp);
}
- in_parse_field = 0;
+ parse_completion = 0;
if (except.reason < 0 || ! exp)
return NULL;
if (expout_last_struct == -1)