public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug tools/24509] eu-readelf does not know how to dissect DW_AT_discr_list
Date: Thu, 02 May 2019 21:48:00 -0000	[thread overview]
Message-ID: <bug-24509-10460-UMhKfY2BXI@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24509-10460@http.sourceware.org/bugzilla/>

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

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 =>
                  null;
               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 =>
            null;
      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.

  parent reply	other threads:[~2019-05-02 21:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 20:47 [Bug tools/24509] New: " tromey at sourceware dot org
2019-05-01 22:36 ` [Bug tools/24509] " mark at klomp dot org
2019-05-02 15:51 ` tromey at sourceware dot org
2019-05-02 16:07 ` tromey at sourceware dot org
2019-05-02 21:48 ` mark at klomp dot org [this message]
2019-05-09 14:01 ` tromey at sourceware dot org
2019-05-10 17:44 ` mark at klomp dot org
2019-05-16 15:28 ` 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-24509-10460-UMhKfY2BXI@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@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).