From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2775 invoked by alias); 27 Apr 2010 17:58:30 -0000 Received: (qmail 2756 invoked by uid 22791); 27 Apr 2010 17:58:28 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Apr 2010 17:58:22 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3RHwLfr021553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 27 Apr 2010 13:58:21 -0400 Received: from qcore.mollernet.net (vpn-8-212.rdu.redhat.com [10.11.8.212]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3RHwK1U028628 for ; Tue, 27 Apr 2010 13:58:20 -0400 Message-ID: <4BD725BC.2090709@redhat.com> Date: Tue, 27 Apr 2010 17:58:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: pr 11543 using-directive does not autocomplete Content-Type: multipart/mixed; boundary="------------040908060700090308070502" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00917.txt.bz2 This is a multi-part message in MIME format. --------------040908060700090308070502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 189 Attached patch fixes this, but here's a question: Is it possible to have multiple name qualifications like "A::B::whatever"? If so, this path will have to be tweaked to address that. --------------040908060700090308070502 Content-Type: text/x-patch; name="pr11543.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr11543.patch" Content-length: 4469 ? 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" + --------------040908060700090308070502 Content-Type: text/x-patch; name="pr11543-sum.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr11543-sum.diff" Content-length: 3078 --- virgin.sum 2010-04-27 11:56:57.722206261 -0400 +++ patched.sum 2010-04-27 13:43:32.856201547 -0400 @@ -1,4 +1,4 @@ -Test Run By moller on Tue Apr 27 11:41:42 2010 +Test Run By moller on Tue Apr 27 13:30:09 2010 Native configuration is i686-pc-linux-gnu === gdb tests === @@ -629,8 +629,8 @@ PASS: gdb.base/attach.exp: cd away from process working directory FAIL: gdb.base/attach.exp: before attach3, flush symbols (GDB internal error) PASS: gdb.base/attach.exp: before attach3, flush exec -FAIL: gdb.base/attach.exp: attach when process' a.out not in cwd (GDB internal error) -FAIL: gdb.base/attach.exp: after attach3, exit (the program is no longer running) +PASS: gdb.base/attach.exp: attach when process' a.out not in cwd +PASS: gdb.base/attach.exp: after attach3, exit PASS: gdb.base/attach.exp: force switch to gdb64, if necessary PASS: gdb.base/attach.exp: attach call PASS: gdb.base/attach.exp: info other register @@ -12341,6 +12341,10 @@ Running ../../../src/gdb/testsuite/gdb.cp/pr10728.exp ... PASS: gdb.cp/pr10728.exp: continue to breakpoint: marker 1 PASS: gdb.cp/pr10728.exp: print x->y2 - x->y1 +Running ../../../src/gdb/testsuite/gdb.cp/pr11543.exp ... +PASS: gdb.cp/pr11543.exp: continue to breakpoint: break-here +PASS: gdb.cp/pr11543.exp: complete p vari +PASS: gdb.cp/pr11543.exp: complete p A::vari Running ../../../src/gdb/testsuite/gdb.cp/pr9067.exp ... PASS: gdb.cp/pr9067.exp: print b Running ../../../src/gdb/testsuite/gdb.cp/pr9167.exp ... @@ -15727,11 +15731,11 @@ Running ../../../src/gdb/testsuite/gdb.reverse/watch-reverse.exp ... Running ../../../src/gdb/testsuite/gdb.server/ext-attach.exp ... PASS: gdb.server/ext-attach.exp: set remote exec-file -FAIL: gdb.server/ext-attach.exp: attach to remote program 1 +PASS: gdb.server/ext-attach.exp: attach to remote program 1 PASS: gdb.server/ext-attach.exp: backtrace 1 -FAIL: gdb.server/ext-attach.exp: detach +PASS: gdb.server/ext-attach.exp: detach PASS: gdb.server/ext-attach.exp: backtrace with no program -FAIL: gdb.server/ext-attach.exp: attach to remote program 2 +PASS: gdb.server/ext-attach.exp: attach to remote program 2 PASS: gdb.server/ext-attach.exp: backtrace 2 PASS: gdb.server/ext-attach.exp: kill PASS: gdb.server/ext-attach.exp: monitor exit @@ -16546,7 +16550,7 @@ PASS: gdb.threads/watchthreads2.exp: all threads started PASS: gdb.threads/watchthreads2.exp: watch x PASS: gdb.threads/watchthreads2.exp: set var test_ready = 1 -KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app (PRMS: gdb/10116) +PASS: gdb.threads/watchthreads2.exp: all threads incremented x Running ../../../src/gdb/testsuite/gdb.trace/actions.exp ... PASS: gdb.trace/actions.exp: 5.1a: set three tracepoints, no actions PASS: gdb.trace/actions.exp: 5.1b: set actions for first tracepoint @@ -16814,8 +16818,8 @@ === gdb Summary === -# of expected passes 15944 -# of unexpected failures 47 +# of expected passes 15953 +# of unexpected failures 42 # of expected failures 45 # of untested testcases 7 # of unsupported tests 62 --------------040908060700090308070502--