From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9793 invoked by alias); 15 May 2013 17:36:09 -0000 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 Received: (qmail 9782 invoked by uid 89); 15 May 2013 17:36:09 -0000 X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 15 May 2013 17:36:09 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4FHa7I1021064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 May 2013 13:36:07 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4FHa6Sp017395 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 15 May 2013 13:36:06 -0400 Message-ID: <5193C786.4000207@redhat.com> Date: Wed, 15 May 2013 17:36:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Doug Evans CC: "gdb-patches@sourceware.org ml" Subject: Re: [RFC] Cleanup for make_source_files_completion_list References: <51895A2F.8000504@redhat.com> <5191340B.60100@redhat.com> <519156F5.5090000@redhat.com> In-Reply-To: <519156F5.5090000@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00550.txt.bz2 On 05/13/2013 02:11 PM, Keith Seitz wrote: > On 05/13/2013 11:42 AM, Keith Seitz wrote: >> However, I think that the comment quoted above (and the surrounding >> block of code which does the copying) should be removed and the callers >> of make_source_files_completion list should pass text AND word instead >> of text and text. add_filename_to_list (in symtab.c) does this text - >> word adjustment already, so it is not necessary to repeat it here. WDYT? > > Something like this? [This causes no regressions in the test suite or by > manually hacking at it.] Ok, no, this won't work either. The text in the comment (which I proposed to remove) hints at the problem: $ cat same.c int same (int a) { return a; } int main (void) { return same (0); } $ gcc -g same.c -o same $ gdb -q same (gdb) b same.\t\t [blah blah blah] c same (gdb) Compare this with unpatched gdb: (gdb) b same.\t\t [blah blah blah] same.c same So this needs to stay put. I'll see if I can generate a test case for this. Thanks to Tom for bringing this up. Keith