summaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-07 20:09:07 +0000
committerTom Tromey <tromey@redhat.com>2012-12-07 20:09:07 +0000
commit0d24affba26f2723201fbbc77dc66b88467a956e (patch)
tree7ae9bb99380583488ed9882c6874c53a8ea45005 /gdb/language.h
parent18b9b611f8666820a4ca712603fae0073a78b252 (diff)
downloadgdb-0d24affba26f2723201fbbc77dc66b88467a956e.tar.gz
* ada-lang.c (ada_make_symbol_completion_list): Add 'code'
argument, assertion. * c-exp.y (typebase): Add completion productions. * completer.c (expression_completer): Handle tag completion. * expression.h (parse_expression_for_completion): Add argument. * f-lang.c (f_make_symbol_completion_list): Add 'code' argument. * language.h (struct language_defn) <la_make_symbol_completion_list>: Add 'code' argument. * parse.c (expout_tag_completion_type, expout_completion_name): New globals. (mark_struct_expression): Add assertion. (mark_completion_tag): New function. (parse_exp_in_context): Initialize new globals. (parse_expression_for_completion): Add 'code' argument. Handle tag completion. * parser-defs.h (mark_completion_tag): Declare. * symtab.c (default_make_symbol_completion_list_break_on): Add 'code' argument. Update. (default_make_symbol_completion_list): Add 'code' argument. (make_symbol_completion_list): Update. (make_symbol_completion_type): New function. * symtab.h (default_make_symbol_completion_list_break_on) (default_make_symbol_completion_list): Update. (make_symbol_completion_type): Declare. testsuite * gdb.base/break1.c (enum some_enum, union some_union): New. (some_enum_global, some_union_global, some_value): New globals. * gdb.base/completion.exp: Add tag completion tests.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 3a1e390f767..49afbc40053 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -284,8 +284,11 @@ struct language_defn
/* Should return a vector of all symbols which are possible
completions for TEXT. WORD is the entire command on which the
- completion is being made. */
- VEC (char_ptr) *(*la_make_symbol_completion_list) (char *text, char *word);
+ completion is being made. If CODE is TYPE_CODE_UNDEF, then all
+ symbols should be examined; otherwise, only STRUCT_DOMAIN
+ symbols whose type has a code of CODE should be matched. */
+ VEC (char_ptr) *(*la_make_symbol_completion_list) (char *text, char *word,
+ enum type_code code);
/* The per-architecture (OS/ABI) language information. */
void (*la_language_arch_info) (struct gdbarch *,