Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: Andreas Schwab <schwab@suse.de>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Handle DW_TAG_subrange_type
Date: Thu, 04 Dec 2003 17:49:00 -0000	[thread overview]
Message-ID: <20031204174939.GG1652@gnat.com> (raw)
In-Reply-To: <16335.26147.29714.759783@localhost.redhat.com>

> Can you post an example of the debug info you see for Ada in this
> case, just for the record?

In addition to the example posted by Andreas, here is the code in GCC
that generates these subrange types:

    static dw_die_ref
    subrange_type_die (tree type)
    {
      dw_die_ref subtype_die;
      dw_die_ref subrange_die;
      tree name = TYPE_NAME (type);
    
      subtype_die = base_type_die (TREE_TYPE (type));
    
      if (TREE_CODE (name) == TYPE_DECL)
        name = DECL_NAME (name);
    
      subrange_die = new_die (DW_TAG_subrange_type, comp_unit_die, type);
      add_name_attribute (subrange_die, IDENTIFIER_POINTER (name));
      if (TYPE_MIN_VALUE (type) != NULL)
        add_bound_info (subrange_die, DW_AT_lower_bound,
                        TYPE_MIN_VALUE (type));
      if (TYPE_MAX_VALUE (type) != NULL)
        add_bound_info (subrange_die, DW_AT_upper_bound,
                        TYPE_MAX_VALUE (type));
      add_AT_die_ref (subrange_die, DW_AT_type, subtype_die);
    
      return subrange_die;
    }

So the only information we are stuffing in these types are the name,
the bounds, and a reference to the parent type.

-- 
Joel


  parent reply	other threads:[~2003-12-04 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-22 20:08 Andreas Schwab
2003-11-24  9:51 ` Joel Brobecker
2003-11-24 12:16   ` Andreas Schwab
2003-12-04 16:51 ` Elena Zannoni
2003-12-04 17:29   ` Andreas Schwab
2003-12-04 17:49   ` Joel Brobecker [this message]
2003-12-04 18:16     ` Elena Zannoni
2004-01-08 23:33 Elena Zannoni
2004-01-14 17:28 ` Joel Brobecker
2004-01-15 17:11   ` Elena Zannoni
2004-01-17  5:37     ` Joel Brobecker

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=20031204174939.GG1652@gnat.com \
    --to=brobecker@gnat.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=schwab@suse.de \
    /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