? testsuite/gdb.cp/.Makefile.in.swp ? testsuite/gdb.cp/pr11543 ? testsuite/gdb.cp/pr9594 Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.11687 diff -u -r1.11687 ChangeLog --- ChangeLog 26 Apr 2010 21:45:47 -0000 1.11687 +++ ChangeLog 27 Apr 2010 17:53:59 -0000 @@ -1,3 +1,8 @@ +2010-04-27 Chris Moller + + PR 11543 + * symtab.c (completion_list_add_name): Handle qualified names. + 2010-04-26 Doug Evans * serial.c (serial_write): Handle serial_debug_p akin to serial_read. Index: symtab.c =================================================================== RCS file: /cvs/src/src/gdb/symtab.c,v retrieving revision 1.233 diff -u -r1.233 symtab.c --- symtab.c 23 Apr 2010 12:08:06 -0000 1.233 +++ symtab.c 27 Apr 2010 17:54:03 -0000 @@ -3345,6 +3345,21 @@ int newsize; int i; + { + if (!strstr (sym_text, "::")) + { + char *sym_qual_ptr = strstr (symname, "::"); + + if (sym_qual_ptr) + { + sym_qual_ptr += 2; + while(isspace (*sym_qual_ptr)) + sym_qual_ptr++; + symname = sym_qual_ptr; + } + } + } + /* clip symbols that cannot match */ if (strncmp (symname, sym_text, sym_text_len) != 0) Index: testsuite/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v retrieving revision 1.2256 diff -u -r1.2256 ChangeLog --- testsuite/ChangeLog 26 Apr 2010 20:49:27 -0000 1.2256 +++ testsuite/ChangeLog 27 Apr 2010 17:54:20 -0000 @@ -1,3 +1,10 @@ +Tue Apr 27 13:49:24 2010 Chris Moller + + PR 11543 + * gdb.cp/Makefile.in (EXECUTABLES): Added pr11543. + * gdb.cp/pr11543.cc: + * gdb.cp/pr11543.exp: New files. + 2010-04-24 Pierre Muller PR breakpoints/11531. Index: testsuite/gdb.cp/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/Makefile.in,v retrieving revision 1.11 diff -u -r1.11 Makefile.in --- testsuite/gdb.cp/Makefile.in 21 Apr 2010 17:33:54 -0000 1.11 +++ testsuite/gdb.cp/Makefile.in 27 Apr 2010 17:54:21 -0000 @@ -5,7 +5,7 @@ derivation inherit local member-ptr method misc \ overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace \ ref-types ref-params method2 pr9594 gdb2495 virtfunc2 pr9067 \ - pr1072 pr10687 pr9167 + pr1072 pr10687 pr9167 pr11543 all info install-info dvi install uninstall installcheck check: @echo "Nothing to be done for $@..." Index: testsuite/gdb.cp/pr11543.cc =================================================================== RCS file: testsuite/gdb.cp/pr11543.cc diff -N testsuite/gdb.cp/pr11543.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/gdb.cp/pr11543.cc 27 Apr 2010 17:54:21 -0000 @@ -0,0 +1,7 @@ +namespace A { int variablex = 1; } +int main (void) +{ + int variabley = 2; + using namespace A; + return 0; /* break-here */ +} Index: testsuite/gdb.cp/pr11543.exp =================================================================== RCS file: testsuite/gdb.cp/pr11543.exp diff -N testsuite/gdb.cp/pr11543.exp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/gdb.cp/pr11543.exp 27 Apr 2010 17:54:21 -0000 @@ -0,0 +1,34 @@ +#Copyright 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set nl "\[\r\n\]+" + +set testfile pr11543 +set srcfile ${testfile}.cc +if [prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}] { + return -1 +} + +if ![runto_main] then { + fail "Can't run to main" + return +} + +gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_continue_to_breakpoint "break-here" + +gdb_test "complete p vari" "p variablex${nl}p variabley" +gdb_test "complete p A::vari" "p A::variablex" +