[Bug default/26987] GCC 11 Ada binaries contain unknown tags

jakub at redhat dot com sourceware-bugzilla@sourceware.org
Wed Dec 2 15:08:15 GMT 2020


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.


More information about the Dwz mailing list