From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99413 invoked by alias); 10 May 2019 20:27:54 -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 99399 invoked by uid 89); 10 May 2019 20:27:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 May 2019 20:27:53 +0000 Received: from [172.16.0.120] (192-222-157-41.qc.cable.ebox.net [192.222.157.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 389661E481; Fri, 10 May 2019 16:27:51 -0400 (EDT) Subject: Re: [PATCH] cc-with-tweaks: show dwz stderr and check exit code To: Tom de Vries , Simon Marchi , gdb-patches@sourceware.org Cc: Jakub Jelinek References: <20190508160012.32596-1-simon.marchi@efficios.com> <0ba3b8fa-18d9-65bf-13ff-53f1baf69868@efficios.com> <5fd01995-2c7a-411d-cc03-58199ffa615c@simark.ca> From: Simon Marchi Message-ID: <198e32ec-ece0-dc5b-8c8d-8b466f31addf@simark.ca> Date: Fri, 10 May 2019 20:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-05/txt/msg00266.txt.bz2 On 2019-05-10 3:49 p.m., Tom de Vries wrote: > The point I was trying to make, is that in a test-case there may be > dwarf related to the test-case, and other, run-of-the-mill dwarf that is > not at all related to the feature being tested, and when dwz has changed > the executable, there's no way of knowing which of the two, or both has > been affected. So, testing a test-case in combination with dwz, and > seeing that the dwarf has been changed by dwz, does not guarantee you > that the dwarf related to the feature being tested has in fact been changed. Indeed. >> I have included your suggestion in the patch below and made a few adjustments. >> >> By the way, do you have a way to reproduce the case where dwz doesn't optimize anything >> in single file mode? Even with a file with just an empty main, dwz manages to do some >> optimization. >> > > I guess if you make a start.c with an empty _start function and compile > with -stdlib (so, the start testcase in the dwz testsuite), and then > furhter prune down the generated .s file, you'll end up with triggering > that warning. Ok, that's a bit further than I am willing to go right now to test the script :). >> Another question: in multifile mode, we check if the output dwz file exists. Should we also >> check that the original file now contains a .gnu_debugaltlink section? If dwz succeeded to >> generated the external dwz file, but failed to modify the original executable, we could also >> end up running a test with a non-dwzified executable. >> > > Agreed, we could do that, but I haven't seen any problems with dwz > related to that, so I'm not sure it's worth the churn atm. Ok. > LGTM. Thanks for all the comments, I am pushing the patch. Simon