From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22308 invoked by alias); 15 Mar 2016 22:31:35 -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 22296 invoked by uid 89); 15 Mar 2016 22:31:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:e89a8ff, H*f:sk:e89a8ff X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 15 Mar 2016 22:31:32 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1afxUw-0000X3-MO from Don_Breazeal@mentor.com ; Tue, 15 Mar 2016 15:31:30 -0700 Received: from [172.30.2.127] (147.34.91.1) by SVR-ORW-FEM-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 15 Mar 2016 15:31:30 -0700 Subject: Re: [PATCH v4] PR 18303, Tolerate malformed input for lookup_symbol-called functions. To: Doug Evans , Keith Seitz References: CC: "gdb-patches@sourceware.org" From: Don Breazeal Message-ID: <56E88D3C.3000202@codesourcery.com> Date: Tue, 15 Mar 2016 22:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00248.txt.bz2 On 3/15/2016 1:30 PM, Doug Evans wrote: > Don Breazeal writes: > > Apologies -- the previous version of this patch was missing one file, > > added here. Sorry for the noise. > > --Don > > > > ---V3 Comment--- > > This patch differs from v2 in that the new test > gdb.linespec/ls-errs-cp.exp > > is gone, and instead (per Pedro's suggestion) gdb.linespec/ls-errs.exp > has > > been modified to test both C & C++, and to incorporate the small amount > of > > extra testing from ls-errs-cp.exp. > > > > It also includes, unchanged from the previous version of the patch: > > > > * an updated version of the alternate fix that Keith proposed for my > > patch that addressed PR breakpoints/18303. Doug has approved (in > > concept, at least) the code portion of the patch. > > > > * a couple of other new tests of colons in linespecs. > > > > Thanks, > > --Don > > > > ----------- > > lookup_symbol is often called with user input. Consequently, any > > function called from lookup_symbol{,_in_language} should attempt to > > deal with malformed input gracefully. After all, malformed user > > input is not a programming/API error. > > > > This patch does not attempt to find/correct all instances of this. It > > only fixes locations in the code that trigger test suite failures. > > > > This patch fixes PR breakpoints/18303, "Assertion: -breakpoint-insert > > with windows paths of file in non-current directory". > > > > The patch includes three new tests related to this. One is just > > gdb.linespec/ls-errs.exp copied and converted to use C++ instead of C, > and > > to add a case using a file name containing a Windows-style logical drive > > specifier. The others include an MI test to provide a regression test > for > > the specific case reported in PR 18303, and a C++ test for proper error > > handling of access to a program variable when using a file scope > specifier > > that refers to a non-existent file. > > > > Tested on x86_64 native Linux. > > > > gdb/ChangeLog > > 2016-01-28 Keith Seitz > > > > PR breakpoints/18303 > > * cp-namespace.c (cp_lookup_bare_symbol): Change assertion to > > look for "::" instead of simply ":". > > (cp_search_static_and_baseclasses): Return null_block_symbol for > > malformed input. > > Remove assertions. > > * cp-support.c (cp_find_first_component_aux): Do not return > > a prefix length for ':' unless the next character is also ':'. > > > > gdb/testsuite/ChangeLog > > 2016-01-28 Don Breazeal > > > > * gdb.cp/scope-err.cc: New test program. > > * gdb.cp/scope-err.exp: New test script. > > * gdb.linespec/ls-errs.c (myfunction): Expanded to have multiple > > lines and "set breakpoint here" comment. > > * gdb.linespec/ls-errs.exp: Added C++ testing and new test case. > > * gdb.mi/mi-linespec-err-cp.cc: New test program. > > * gdb.mi/mi-linespec-err-cp.exp: New test script. > >... > > Hi. > LGTM > This is now pushed. Keith FYI I made some whitespace/format changes per your comments. Thanks, --Don