From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id C11aHEm27F/gDQAAWB0awg (envelope-from ) for ; Wed, 30 Dec 2020 12:18:01 -0500 Received: by simark.ca (Postfix, from userid 112) id 5DD641F0AA; Wed, 30 Dec 2020 12:18:01 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AE5411E965 for ; Wed, 30 Dec 2020 12:18:00 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 090723851C34; Wed, 30 Dec 2020 17:18:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 090723851C34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609348680; bh=+5vkkUFodbWCuBX54bgRo6ZpaXrJc/4amd6wN8ntIdg=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=notZoFU5Q8UM+giz52mPVksVtpFAAD4cyrua3tjlGiXDTGrtFX55SMMji0xKDW1mI oq9tFyfp1l9U7lO2NPtxjasrSxo3MvUw6849+lW03wiK5+8NVf6fwWcnukrCQQFWdT eLthvrvokUKch7ZWnv7eyar3uisddzzIgBIpl1G8= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id AE2343851C34 for ; Wed, 30 Dec 2020 17:17:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AE2343851C34 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 0BUHHZBH024302 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Dec 2020 12:17:39 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 0BUHHZBH024302 Received: from [10.0.0.213] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 78DB01E965; Wed, 30 Dec 2020 12:17:34 -0500 (EST) Subject: Re: [PATCH v5] Fix range end handling of inlined subroutines To: Bernd Edlinger , "gdb-patches@sourceware.org" , Andrew Burgess , Joel Brobecker , Tom Tromey , Pedro Alves , Eli Zaretskii References: Message-ID: Date: Wed, 30 Dec 2020 12:17:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 30 Dec 2020 17:17:35 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-12-29 4:10 a.m., Bernd Edlinger wrote: > Hi, > > > this is a minor update to the previous version here: > https://sourceware.org/pipermail/gdb-patches/2020-November/173614.html > > The only real change is here: > > --- a/gdb/buildsym.c > +++ b/gdb/buildsym.c > @@ -429,7 +429,10 @@ struct block * > { > m_inline_end_vector.push_back (end_inclusive + 1); > if (end_inclusive + 1 == start) > - end_inclusive = start; > + { > + end_inclusive = start; > + m_pending_addrmap_interesting = true; > + } > } > > if (m_pending_addrmap == nullptr) > > > The test case with an empty inline that triggered this > is from PR 25987. > > It is a real-world code that triggers both an empty inline > function and the wrong call-stack immediately after > the inline. So I added this test case as well. > > So this fixes PR 25987 as well as a lot of issues with > debugging inlined functions in general. > > > Thanks > Bernd. > I'll look at this patch to try to get the ball rolling, even though I do not feel qualified at all. One quick thing, in this change here: --- a/gdb/testsuite/gdb.cp/step-and-next-inline.exp +++ b/gdb/testsuite/gdb.cp/step-and-next-inline.exp @@ -29,16 +29,9 @@ if {[test_compiler_info gcc*] && ![supports_statement_frontiers] } { proc do_test { use_header } { global srcfile testfile - if { $use_header } { - # This test will not pass due to poor debug information - # generated by GCC (at least upto 10.x). See - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94474 - return - } - set options {c++ debug nowarnings optimize=-O2} if { [supports_statement_frontiers] } { - lappend options -gstatement-frontiers + lappend options additional_flags=-gstatement-frontiers } You appear to fix a bug in the test where we were missing "additional_flags=", causing -gstatement-frontiers not to be passed to the compiler. I think that fix could be pushed separately immediately. The issue was introduced in eb24648c453c28f2898fb599311ba004394a8b41 ("Fix gdb.cp/step-and-next-inline.exp with Clang"). Simon