From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 4297C3896828 for ; Thu, 18 Feb 2021 20:48:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4297C3896828 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 61B98AB4C; Thu, 18 Feb 2021 20:48:14 +0000 (UTC) Subject: Re: [PATCH] Print die_hash2 for --odr --devel-dump-dies To: Mark Wielaard , dwz@sourceware.org, jakub@redhat.com Cc: Mark Wielaard References: <20210215203416.GA29992@delia> From: Tom de Vries Message-ID: Date: Thu, 18 Feb 2021 21:48:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:48:16 -0000 On 2/18/21 4:03 PM, Mark Wielaard wrote: > Hi Tom, > > On Mon, 2021-02-15 at 21:34 +0100, Tom de Vries wrote: >> For --odr, there's an additional hash value, die->u.p1.die_hash2. >> >> Print this with --devel-dump-dies, such that we have: >> ... >> $ dwz --devel-dump-dies --odr odr-struct >> 114 O f56004ac(cd46c7ab) f56004ac aaa structure_type >> ... >> 1ba O f56004ac(cd46c7ab) f56004ac aaa structure_type >> ... >> >> Used to debug PR27400. >> >> Any comments? > > Obviously this is useful. > But I always forget how to use these --devel flags. > > They are only in the dwz-for-test binary, which isn't build by default, Hi Mark, they're only defined when building with -DDEVEL. Which is enabled in dwz-for-test (which is enabled by default in the testsuite), but also in my usual build command. > and seems to have some subtle other differences, like undefining > __GNUC__? > That's just a ploy to get both the -D__GNUC__ and -U__GNUC__ paths exercised. It's not really specific to -DDEVEL. > Is there more documentation on the --devel flags/binary Nope. > or is this just > meant for people directly hacking on dwz in the git repo? Yep. The idea was to move all hacky stuff (like f.i -DDEBUG_DUMP_DIES) to command line switches under -DDEVEL, such that you have two versions: - the official one, -UDEVEL, without anything slowing dwz down, or exposing unstable interfaces to users, and - the development one, -DDEVEL, with the perks of extra traces and switches to influence behaviour, but possible slower and experimental. HTH, - Tom