Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/DWARF] Add DW_AT_GNAT_descriptive_type support
Date: Thu, 24 Dec 2009 19:40:00 -0000	[thread overview]
Message-ID: <20091224193948.GA7936@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20091224180657.GV5942@adacore.com>

Hi Joel,

On Thu, 24 Dec 2009 19:06:57 +0100, Joel Brobecker wrote:
> Quick summary: The debugging info for Ada code follows an encoding
> (document in exp_dbug.ads in the GCC sources) which requires

http://gcc.gnu.org/viewcvs/trunk/gcc/ada/exp_dbug.ads?view=co
	Record Types with Variable-Length Fields


> "parallel lookups". For instance, a record type with variable-size
> fields will see a parallel type named type___XVE being generated
> by the compiler.  The debugger is supposed to look this type up
> in order to obtain some info necessary to decode the type.
> 
> The new DW_AT_GNAT_descriptive_type attribute allows us to speed up
> this lookup when using DWARF,

DWARF provides DW_FORM_block* for such varying types.  Such DW_FORM_block*
producer is implemented in gfortran upstream and it is implemented as the VLA
patchset (currently waiting on a discussion + resubmit from me) for GDB:
	http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00612.html
	http://sourceware.org/gdb/wiki/ArcherBranchManagement - archer-jankratochvil-vla

It is true such DW_FORM_block* bytecode is not available for STABS.
But such DWARF-specific DW_AT_GNAT_descriptive_type attribute would exist in
DWARF only to unify debuginfo producer/consumer with less featureful STABS.

While it may make sense from the practical point of view I would like a clear
statement this is the reason for this "gross" DW_AT_GNAT_descriptive_type code.

With properly implemented DWARF-only DW_FORM_block* producer for GNAT the GDB
consumer would be IMO some small extension of dynamic types (to accept
DW_FORM_block* for several more DW_AT_* attributes and reuse the existing
dynamic->static converting code in check_typedef).


Regards,
Jan


  reply	other threads:[~2009-12-24 19:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 18:07 Joel Brobecker
2009-12-24 19:40 ` Jan Kratochvil [this message]
2009-12-25  4:36   ` Joel Brobecker
2009-12-25  9:40     ` Jan Kratochvil
2010-11-03 19:25       ` Jan Kratochvil
2010-11-03 20:48         ` Joel Brobecker
2010-01-05 20:12 ` Tom Tromey
2010-01-11 10:41   ` Joel Brobecker
2010-01-11 18:15     ` Tom Tromey
2010-01-12  5:53       ` 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=20091224193948.GA7936@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@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