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 B23AB3874C1D for ; Mon, 15 Feb 2021 08:32:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B23AB3874C1D 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 CB198AD78; Mon, 15 Feb 2021 08:32:40 +0000 (UTC) Subject: Re: [PATCH] Remove left over "negate" adjustment in compute_abbrevs. To: Mark Wielaard , dwz@sourceware.org References: <20210214153443.19697-1-mark@klomp.org> From: Tom de Vries Message-ID: <32aa3bcc-a5ec-35ac-931a-1c288a636641@suse.de> Date: Mon, 15 Feb 2021 09:32:40 +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: <20210214153443.19697-1-mark@klomp.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, 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: Mon, 15 Feb 2021 08:32:43 -0000 On 2/14/21 4:34 PM, Mark Wielaard wrote: > Before commit 47af8da7c "Assorted DW_FORM_implicit_const fixes" there > was a hack to track whether decl/call_file line numbers had been > translated already. This worked by negating the value once it was I'd add "translated" here, reads easier. > and > not translating again when the value was negative. Then in > compute_abbrevs all negated values we made positive again. Most of we -> were > this hack was removed in the above commit. Except for making all > negated values positive again in compute_abbrevs. Remove it there too. > No decl/call_file line number tables can ever be negative. > LGTM. Thanks, - Tom > * dwz.c (compute_abbrevs): Remove negate adjustment for > DW_AT_decl_file and DW_AT_call_file attribute DW_FORM_implicit_const > values. > --- > dwz.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) > > diff --git a/dwz.c b/dwz.c > index 992da77..0664052 100644 > --- a/dwz.c > +++ b/dwz.c > @@ -11622,20 +11622,7 @@ compute_abbrevs (DSO *dso) > abbrev_size += size_of_uleb128 (arr[i]->attr[j].attr); > abbrev_size += size_of_uleb128 (arr[i]->attr[j].form); > if (arr[i]->attr[j].form == DW_FORM_implicit_const) > - { > - /* If this is a shared abbrev for a file reference > - attribute, update to the new file number (in the > - mulifile .debug_line). Note that this might > - change the abbrev size... */ > - if (unlikely (wr_multifile || op_multifile) > - && (arr[i]->attr[j].attr == DW_AT_decl_file > - || arr[i]->attr[j].attr == DW_AT_call_file)) > - { > - if (arr[i]->values[j] < 0) > - arr[i]->values[j] = -arr[i]->values[j]; > - } > - abbrev_size += size_of_sleb128 (arr[i]->values[j]); > - } > + abbrev_size += size_of_sleb128 (arr[i]->values[j]); > } > abbrev_size += 2; > } >