From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89064 invoked by alias); 26 Jan 2019 11:04:08 -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 89048 invoked by uid 89); 26 Jan 2019 11:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=0400 X-HELO: mailsec118.isp.belgacom.be Received: from mailsec118.isp.belgacom.be (HELO mailsec118.isp.belgacom.be) (195.238.20.114) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 26 Jan 2019 11:04:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1548500644; x=1580036644; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=+2BweVKxLCvncNhloY4zelSpiXv8BUOzu0JQGGRPEDE=; b=gRWOPJp9T9lSZ5dfNAZLboF5bhteFTFGD5sRo3X3ssvbkO9zQ8T4Tsbd rSYXpn2XRMoLm9GRH+/koOWNNpFzDA==; Received: from 30.202-67-87.adsl-dyn.isp.belgacom.be (HELO md) ([87.67.202.30]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 26 Jan 2019 12:04:02 +0100 Message-ID: <1548500642.1493.8.camel@skynet.be> Subject: Re: [RFAv2 1/3] Use function_name_style to print Ada and C function names From: Philippe Waroquiers To: Joel Brobecker Cc: Tom Tromey , gdb-patches@sourceware.org Date: Sat, 26 Jan 2019 11:04:00 -0000 In-Reply-To: <20190126062147.GA26587@adacore.com> References: <20190112222835.16932-1-philippe.waroquiers@skynet.be> <20190112222835.16932-2-philippe.waroquiers@skynet.be> <877ef2ncvy.fsf@tromey.com> <1547899873.15869.5.camel@skynet.be> <20190126062147.GA26587@adacore.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00562.txt.bz2 On Sat, 2019-01-26 at 10:21 +0400, Joel Brobecker wrote: > > > Philippe> Note that ada-typeprint.c print_func_type is called with > > > Philippe> types representing functions and is also called to print > > > Philippe> a function NAME and its type. In such a case, the function > > > Philippe> name will be printed using function name style. > > > > > > In this particular spot it still isn't clear to me if this will > > > sometimes style a type name. So, I'm going to defer to Joel on the Ada > > > bits. > > > > Would be nice to have Joel confirming, but I am quite confident that > > this will only style function names and not type names. > > I reviewed the situation, and I think Philippe is right in the sense > that when this function is called with a name, it's an actual function's > name. > > When one declares a function type in Ada, it has to be an access > type (the Ada equivalent of a pointer). And the target (function) > declaration is anonymous. This is what it looks like: > > type FA is access procedure (A : System.Address); Yes, effectively, that is the reasoning. > With all that, I'm wondering if Philippe had other examples > where he can demonstrate the usefulness of this patch. > At the moment, if the maintenance command is the only case, > knowing that the output gets sent to a file, rather than > stdout, and thus should not be stylized, are there other > situations I couldn't think of where this patch would be > useful? This part of the patch ensures that the function names in the output of 'info functions [-q] [-t TYPEREGEXP] [NAMEREGEXP]' are stylized. Thanks Philippe