From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22768 invoked by alias); 10 Jan 2018 03:36:23 -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 22758 invoked by uid 89); 10 Jan 2018 03:36:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=relate, pleasure X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jan 2018 03:36:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8C6C111721D; Tue, 9 Jan 2018 22:36:13 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xaB2woX6Xcvt; Tue, 9 Jan 2018 22:36:13 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2C5891170D1; Tue, 9 Jan 2018 22:36:13 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9920380374; Wed, 10 Jan 2018 07:36:08 +0400 (+04) Date: Wed, 10 Jan 2018 03:36:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: Fix gdb.ada/bp_c_mixed_case.exp (PR gdb/22670) (Re: [PATCH 3/3] Add new gdb.ada/bp_c_mixed_case testcase for PR gdb/22670) Message-ID: <20180110033608.adf7hvlaf5g6y6qm@adacore.com> References: <1515054953-81012-1-git-send-email-brobecker@adacore.com> <1515054953-81012-4-git-send-email-brobecker@adacore.com> <20180108035724.gac5u77znunzhho3@adacore.com> <20180109094625.7udsip4v23i4d5no@adacore.com> <7b5f4115-42b6-289a-3d6f-4d4b66637a4a@redhat.com> <619dda09-5c48-447e-ead9-c9d6a5ac9743@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <619dda09-5c48-447e-ead9-c9d6a5ac9743@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-01/txt/msg00192.txt.bz2 Hi Pedro, > The main idea behind making the name matcher be determined by > the symbol's language is so that C++ (etc.) wildmatching in > linespecs works even if the current language is not C++, as e.g., > when you step through C or assembly code. > > Ada's verbatim matching syntax however ("<...>") isn't quite > the same. It is more a property of the current language than > of a particular symbol's language. We want to support > this syntax when debugging an Ada program, but it's reason of > existence is to find non-Ada symbols. This suggests going back > to enabling it depending on current language instead of language > of the symbol being matched. That's a good way of describing the situation. > I'm not entirely happy with the "current_language" reference > (though I think that it's harmless). I think we could try storing the > current language in the lookup_name_info object, and then convert > a bunch of functions more to pass around lookup_name_info objects > instead of "const char *" names. I.e., build the lookup_name_info > higher up. I'm not sure about that, I'll have to think more > about it. Maybe something different will be better. I understand. I have the same feeling in general. > It doesn't help that I'm not used to debugging Ada code, but the > recent testcase additions surely have helped understand better the > intended use cases. Thanks much for those. My pleasure. I also have the same feeling, but with debugging C++ right now, so I can certainly relate! > Meanwhile, this looks small- and safe-enough for 8.1, to me. > WDYT? > > I'd extended the testcase to also exercise a no-debug-info > function, for extra coverage of the minsyms-only paths. Thanks! The patch looks good to me. A few minor typos below... > >From d1f377264f278d2839c3cf331e931c7382114e11 Mon Sep 17 00:00:00 2001 > From: Pedro Alves > Date: Tue, 9 Jan 2018 14:48:55 +0000 > Subject: [PATCH] Ada: make verbatim matcher override other language matchers > (PR gdb/22670) > > gdb/ChangeLog: > yyyy-mm-dd Pedro Alves > > PR gdb/22670 > * dwarf2read.c > (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher): > Adjust to use language_get_symbol_name_matcher instead of > language_defn::la_get_symbol_name_matcher. > * language.c (language_get_symbol_name_matcher): In in Ada mode ^^^^^ ||||| > and the lookup name is a verbatim match, return Ada's matcher. > * language.h (language_get_symbol_name_matcher): Adjust comment. > (ada_lookup_name_info::verbatim_p):: New method. > > gdb/testsuite/ChangeLog: > yyyy-mm-dd Pedro Alves > > PR gdb/22670 > * gdb.ada/bp_c_mixed_case.exp: Add intro comment. Test printing C > functions too. Test setting breakpoints and printing C functions > with no debug info too. > * gdb.ada/bp_c_mixed_case/qux.c: New file. > +# Try printing again using the "<...>" notation. This shouldn work ^^^^^^^ ||||||| I tested this patch on x86_64-linux, using both the official testsuite as well as AdaCore's testsuite. No regression :). Thanks, Pedro! -- Joel