From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41704 invoked by alias); 12 Feb 2019 14:32:04 -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 41479 invoked by uid 89); 12 Feb 2019 14:32:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=his X-HELO: mail-wr1-f51.google.com Received: from mail-wr1-f51.google.com (HELO mail-wr1-f51.google.com) (209.85.221.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Feb 2019 14:32:03 +0000 Received: by mail-wr1-f51.google.com with SMTP id t27so2915176wra.6 for ; Tue, 12 Feb 2019 06:32:02 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:75e6:857f:3506:a1f4? ([2001:8a0:f913:f700:75e6:857f:3506:a1f4]) by smtp.gmail.com with ESMTPSA id f8sm11703817wrv.41.2019.02.12.06.31.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 06:32:00 -0800 (PST) Subject: Re: [RFAv2 3/3] Make symtab.c better styled. To: Ulrich Weigand References: <20190212140401.3F628D802C8@oc3748833570.ibm.com> Cc: Philippe Waroquiers , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <61a79e05-e6d7-b22b-5995-09425c370d5a@redhat.com> Date: Tue, 12 Feb 2019 14:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190212140401.3F628D802C8@oc3748833570.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00138.txt.bz2 On 02/12/2019 02:04 PM, Ulrich Weigand wrote: > I've just checked the current behavior on a ppc64 machine, > and we do indeed see the (synthetic) dot symbol listed under > "info functions" and the function descriptor symbol listed > under "info variables". > > (gdb) info functions > [...] > Non-debugging symbols: > 0x0000000010000514 .main > > (gdb) info variables > [...] > Non-debugging symbols: > 0x0000000010020088 main > > On the other hand, "info symbol main" does dereference the > function descriptor and returns the code entry point: > > (gdb) info symbol main > .main in section .text of /home/uweigand/a.out > > This all is maybe not perfect, but seems reasonable enough to me. > I'm not sure it's worth spending much effort trying to "fix" > anything here. > OK. > I haven't followed the patch series in detail, do you think it > would break anything I've outlined above? So the question becomes a simple cosmetic one. In this case: > (gdb) info variables > [...] > Non-debugging symbols: > 0x0000000010020088 main Should "main" be printed with function style, or variable style. This basically affects the color used to print the symbol. In Philippe's patch, we'd print it in variable style. If we used msymbol_is_function instead of his "is text symbol" check, we'd print it in function style. Thanks, Pedro Alves