From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36154 invoked by alias); 20 Oct 2017 18:46: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 36145 invoked by uid 89); 20 Oct 2017 18:46:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=realize X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Oct 2017 18:46:03 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6362883B1 for ; Fri, 20 Oct 2017 18:46:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E6362883B1 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=keiths@redhat.com Received: from valrhona.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD9D860BEB for ; Fri, 20 Oct 2017 18:46:01 +0000 (UTC) Subject: Re: [PATCH 1/2] Report call site for inlined functions To: gdb-patches@sourceware.org References: <1499740601-15957-1-git-send-email-keiths@redhat.com> From: Keith Seitz Message-ID: Date: Fri, 20 Oct 2017 18:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00677.txt.bz2 [My reply seems not to have made it to sourceware, so I'm resending.] On 07/18/2017 12:05 PM, Pedro Alves wrote: > On 07/11/2017 03:36 AM, Keith Seitz wrote: >> >> Here you can see the new call-site-func, call-site-file, call-site-fullname, >> and call-site-line. > > The non-inlined call site seems sufficient info to me, at least for > the CLI. I'm not sure whether "call-site" is sufficiently clear that > it's referring to that vs the immediate potential inlined-too > caller though. I think at least the docs need such a clarification. There seems to be consensus on the (lack of) utility of this call-site info, so in the next revision (to follow), I've chosen to remove it all. I think that pretty much resolves (by deletion!) most of your concerns/comments. I've also removed the inlined_symbol proposal since that is also no longer necessary. >> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c >> index 0fdcd42..3b3193b 100644 >> --- a/gdb/dwarf2read.c >> +++ b/gdb/dwarf2read.c >> @@ -11540,13 +11571,28 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) >> { >> templ_func = allocate_template_symbol (objfile); >> templ_func->base.is_cplus_template_function = 1; >> + symbol_storage = (struct symbol *) templ_func; >> break; >> } >> } >> >> + /* If we have an inlined symbol, we must also allocate a different >> + symbol. */ > > How does this work when you have an (inlined) template function? > Like e.g.,: > > template > static T inline_func (T val) > { > return val * 2; > } > > int > not_inline_func (int val) > { > return inline_func (val * 2); > } > I realize this was asked in relation to the proposed (and now deleted) inline_symbol, but to be clear, the above example works: (gdb) b inline_func Breakpoint 1 at 0x4004c0: file inline-t.cc, line 9. (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 0x00000000004004c0 in inline_func at inline-t.cc:9 Keith