[Bug tools/24509] eu-readelf does not know how to dissect DW_AT_discr_list

mark at klomp dot org sourceware-bugzilla@sourceware.org
Thu May 2 21:48:00 GMT 2019


Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
  Attachment #11760|0                           |1
        is obsolete|                            |

--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
Created attachment 11762
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11762&action=edit
discr_list patch that handles signed/unsigned variant_part types

Updated patch that handles signed/unsigned discriminators.

So this is what I used as testcase to have a signed (Integer) and unsigned
(Character) discr.

package Rng is

   type Rec (I : Integer) is record
      case I is
         when Positive =>
            C : Character;
            case I is
               when 1..15 | 17 | 23..255 =>
               when others =>
                  N : Natural;
            end case;
         when -52..-1 =>
            Q: Natural;
         when -53 =>
            R: Character;
         when others =>
            S : String (1 .. 10);
      end case;
   end record;

   Subtype Uppercase is Character Range 'A'..'Z';
   Subtype Lowercase is Character Range 'a'..'z';
   Subtype Numbers is Character Range '0'..'9';

   type RecC (C : Character) is record
      case C is
         when '@' =>
            B : Boolean;
         when Lowercase | Uppercase | Numbers =>
            D : Character;
         when others =>
      end case;
   end record;

   R : Rec (1);
   RC : RecC ('$');

end Rng;

Does the output look like what you would expect?

BTW. The byte_size expressions are impressive!

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

More information about the Elfutils-devel mailing list