public inbox for
 help / color / mirror / Atom feed
From: Mark Wielaard <>
Cc: Mark Wielaard <>
Subject: [PATCH] Remove left over "negate" adjustment in compute_abbrevs.
Date: Sun, 14 Feb 2021 16:34:43 +0100	[thread overview]
Message-ID: <> (raw)

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 and
not translating again when the value was negative. Then in
compute_abbrevs all negated values we made positive again. Most of
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.

   * dwz.c (compute_abbrevs): Remove negate adjustment for
   DW_AT_decl_file and DW_AT_call_file attribute DW_FORM_implicit_const
 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;

             reply	other threads:[~2021-02-14 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14 15:34 Mark Wielaard [this message]
2021-02-15  8:32 ` Tom de Vries
2021-02-15  9:21   ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).