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 D17623854804 for ; Tue, 16 Mar 2021 16:04:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D17623854804 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 E9E8FAEBD; Tue, 16 Mar 2021 16:04:45 +0000 (UTC) Date: Tue, 16 Mar 2021 17:04:44 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com, mark@klomp.org Subject: [committed] Print cu_offset for --devel-dump-pus Message-ID: <20210316160443.GA2227@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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: Tue, 16 Mar 2021 16:04:48 -0000 Hi, While working on PR27578 I used --devel-dump-edges to identify a problem: ... idx: 48 cu: 0xbc incoming: 200 incoming: 201 incoming: 201 incoming: 203 incoming: 204 incoming: 208 ... but I had difficulty relating back the PU with idx 48 to a PU as printed by --devel-dump-pus. By adding the printing of the cu_offset for --devel-dump-pus, we have: ... -Partial unit (phase two): +Partial unit (phase two) @ 0xbc: 611f5 O 2de8b1f3(deb4b00f) 2de8b1f3 Visual structure_type ... and it's clear what PU is meant. Committed to trunk. Thanks, - Tom Print cu_offset for --devel-dump-pus 2021-03-16 Tom de Vries * dwz.c (partition_dups_1): Print cu_offset for --devel-dump-pus. --- dwz.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dwz.c b/dwz.c index d72ec28..7a5d7a3 100644 --- a/dwz.c +++ b/dwz.c @@ -8250,12 +8250,13 @@ partition_dups_1 (dw_die_ref *arr, size_t nr_partitions, size_t *partitions, else stats->pu_ph2_cnt++; } - if (dump_pus_p) - fprintf (stderr, "Partial unit (%s):\n", - second_phase ? "phase two" : "phase one"); partial_cu->cu_kind = CU_PU; partial_cu->cu_offset = *last_partial_cu == NULL ? 0 : (*last_partial_cu)->cu_offset + 1; + if (dump_pus_p) + fprintf (stderr, "Partial unit (%s) @ 0x%x:\n", + second_phase ? "phase two" : "phase one", + partial_cu->cu_offset); partial_cu->cu_version = refcu->cu_version; if (uni_lang_p) partial_cu->lang = refcu->lang;