diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-04-20 19:42:51 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-04-20 19:42:51 +0000 |
commit | 7b08b9eb1217e4f1ea29e569faac77651597e30b (patch) | |
tree | 5e8fac8e69dcb3d63eeb0c77c10779b9998b525e /gdb/testsuite | |
parent | 4ff224cb8d9347245ffea0f5853d862f0574452e (diff) | |
download | gdb-7b08b9eb1217e4f1ea29e569faac77651597e30b.zip gdb-7b08b9eb1217e4f1ea29e569faac77651597e30b.tar.gz gdb-7b08b9eb1217e4f1ea29e569faac77651597e30b.tar.bz2 |
gdb/
* ada-lang.c (struct add_partial_datum): Update the comment for
expand_partial_symbol_name.
(ada_add_partial_symbol_completions): Rename to ...
(ada_expand_partial_symbol_name): ... here, change return type, update
function comment, call symbol_completion_match instead of
symbol_completion_add.
(ada_make_symbol_completion_list): Use now expand_partial_symbol_names
and ada_expand_partial_symbol_name.
* dwarf2read.c (dw2_expand_symtabs_matching): Support NULL
FILE_MATCHER.
(dw2_map_symbol_names): Remove.
(dwarf2_gdb_index_functions): Unlist dw2_map_symbol_names.
* psymtab.c (map_symbol_names_psymtab): Remove.
(expand_symtabs_matching_via_partial): Support NULL FILE_MATCHER.
Support KIND == ALL_DOMAIN. Exchange the NAME_MATCHER and KIND check
order.
(psym_functions): Unlist map_symbol_names_psymtab.
(map_partial_symbol_names): Rename to ...
(expand_partial_symbol_names): ... here, change the FUN type, call
expand_symtabs_matching with ALL_DOMAIN and NULL FILE_MATCHER now.
* psymtab.h (map_partial_symbol_names): Rename to ...
(expand_partial_symbol_names): ... here, change the FUN type.
* symfile.h (struct quick_symbol_functions): Update the description of
expand_symtabs_matching. Remove map_symbol_names.
* symtab.c (search_symbols): Add ALL_DOMAIN to the function comment.
(struct add_name_data): Update the comment for
expand_partial_symbol_name.
(add_partial_symbol_name): Rename to ...
(expand_partial_symbol_name): ... here. Replace
completion_list_add_name call by strncmp.
(default_make_symbol_completion_list_break_on): Use now
expand_partial_symbol_names and expand_partial_symbol_name.
* symtab.h (enum search_domain): New element ALL_DOMAIN.
gdb/testsuite/
* gdb.cp/cpcompletion.exp (complete class methods)
(complete class methods beginning with F): Move them above runto. New
comment about the runto delimiter.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/cpcompletion.exp | 17 |
2 files changed, 15 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1464e13..c964f5c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.cp/cpcompletion.exp (complete class methods) + (complete class methods beginning with F): Move them above runto. New + comment about the runto delimiter. + 2011-04-20 Pedro Alves <pedro@codesourcery.com> * gdb.base/maint.exp: Test that "maint print registers" works diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp index 6a19780..9c96bb7 100644 --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -74,6 +74,15 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} +# Test that completion is restricted by class name (all methods) +test_class_complete Foo "" "complete class methods" \ + [list Foo Foofoo get_foo set_foo ~Foo] + +test_class_complete Foo F "complete class methods beginning with F" \ + [list Foo Foofoo] + +# The tests below depend on the current code scope. + set bp_location [gdb_get_line_number "Set breakpoint here" ${testfile}.cc] if {![runto "${testfile}.cc:$bp_location"]} { @@ -93,11 +102,3 @@ gdb_test "complete p foo1.Fo" "p foo1\\.Foofoo" # Test completion with an anonymous struct. gdb_test "complete p a.g" "p a\\.get" - -# Test that completion is restricted by class name (all methods) -test_class_complete Foo "" "complete class methods" \ - [list Foo Foofoo get_foo set_foo ~Foo] - -test_class_complete Foo F "complete class methods beginning with F" \ - [list Foo Foofoo] - |