aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/completion.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-07 20:09:11 +0000
committerTom Tromey <tromey@redhat.com>2012-12-07 20:09:11 +0000
commit2f68a89553836f68b8676beda9287c93e489bc6e (patch)
tree660cfb00b6001f1f1c3ee19051b85682cf2ce286 /gdb/testsuite/gdb.base/completion.exp
parent155da5173d74221a3099c22c27de1e8e2214982b (diff)
downloadgdb-2f68a89553836f68b8676beda9287c93e489bc6e.zip
gdb-2f68a89553836f68b8676beda9287c93e489bc6e.tar.gz
gdb-2f68a89553836f68b8676beda9287c93e489bc6e.tar.bz2
* 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/testsuite/gdb.base/completion.exp')
-rw-r--r--gdb/testsuite/gdb.base/completion.exp8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index c8edc98..006670d 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -700,6 +700,14 @@ gdb_test "complete sav" "save" "test non-deprecated completion"
gdb_test "complete save-t" "save-tracepoints" "test deprecated completion"
+#
+# Tag name completion.
+#
+
+gdb_test "complete ptype struct some_" "ptype struct some_struct"
+gdb_test "complete ptype enum some_" "ptype enum some_enum"
+gdb_test "complete ptype union some_" "ptype union some_union"
+
# Restore globals modified in this test...
set timeout $oldtimeout1