public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: "jakub at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: dwz@sourceware.org
Subject: [Bug default/26987] GCC 11 Ada binaries contain unknown tags
Date: Wed, 02 Dec 2020 15:08:15 +0000	[thread overview]
Message-ID: <bug-26987-11298-QUKn9iBNmw@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26987-11298@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26987

--- Comment #14 from Jakub Jelinek <jakub at redhat dot com> ---
From DWARF POV, I think the right solution is to use DW_FORM_sdata or
DW_FORM_udata depending on whether the value is signed or unsigned.
Which means
      else
        /* Otherwise represent the bound as an unsigned value with
           the precision of its type.  The precision and signedness
           of the type will be necessary to re-interpret it
           unambiguously.  */
        add_AT_wide (die, attr, wi::to_wide (value));
needs to be replaced by add_AT_{signed,unsigned}_wide with a new classes that
will also have wide_int argument, but will emit DW_FORM_sdata or DW_FORM_udata
from the wide_int, and will be able to deal with values that don't fit into
HOST_WIDE_INT/unsigned HOST_WIDE_INT.
On the consumer side the question is if consumers will be able to cope with
such large leb128 values.
Another option (for DWARF4+ or non-strict DWARF2/3) is for these large
constants in attributes that interpret in DWARF3 block class as a DWARF
expression to use
DW_FORM_block (DW_FORM_exprloc for DWARF4/5) and in there after the uleb128
size put DW_OP_implicit_value with operands the size of the constant and the
constant.
Yes, it will be 3 bytes larger, but it will not be invalid for DWARF3 and very
questionable extension for DWARF4+.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-12-02 15:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 11:22 [Bug default/26987] New: " mliska at suse dot cz
2020-12-01 11:38 ` [Bug default/26987] " jakub at redhat dot com
2020-12-02  8:25 ` mliska at suse dot cz
2020-12-02 10:06 ` mark at klomp dot org
2020-12-02 10:27 ` mliska at suse dot cz
2020-12-02 10:56 ` mark at klomp dot org
2020-12-02 12:29 ` mliska at suse dot cz
2020-12-02 12:31 ` mliska at suse dot cz
2020-12-02 12:51 ` mark at klomp dot org
2020-12-02 13:09 ` mark at klomp dot org
2020-12-02 14:19 ` tromey at sourceware dot org
2020-12-02 14:26 ` jakub at redhat dot com
2020-12-02 14:35 ` mark at klomp dot org
2020-12-02 14:40 ` jakub at redhat dot com
2020-12-02 15:08 ` jakub at redhat dot com [this message]
2020-12-02 15:14 ` mark at klomp dot org
2020-12-02 15:17 ` mark at klomp dot org
2020-12-02 15:18 ` jakub at redhat dot com
2020-12-02 15:21 ` jakub at redhat dot com
2020-12-02 15:27 ` mark at klomp dot org
2020-12-02 15:35 ` tromey at sourceware dot org
2020-12-02 16:05 ` ebotcazou at gcc dot gnu.org
2020-12-02 23:46 ` jakub at redhat dot com
2021-02-13 22:52 ` mark at klomp dot org
2021-02-18 21:19 ` mark at klomp dot org

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=bug-26987-11298-QUKn9iBNmw@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=dwz@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).