Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pierre-Marie de Rodat <derodat@adacore.com>
Cc: Yao Qi <qiyaoltc@gmail.com>, GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Do not consider reference types as dynamic
Date: Fri, 17 Apr 2015 15:29:00 -0000	[thread overview]
Message-ID: <20150417153004.GL4704@adacore.com> (raw)
In-Reply-To: <553121B2.1040406@adacore.com>

> If the definition above is correct, then we should enhance
> typeprint.c/c-typeprint.c/etc. to resolve dynamic type as type
> printing goes in order to get the actual array bounds in the output.
> This means: propagating a (possibly null) value in a lot of
> functions and use it for type resolution when possible. I guess this
> would involve a big patch but would also cover the "ptype" case.
> 
> I guess another way to "just get things working" would be to revert
> my previous patch and to enhance the dynamic property mechanism
> (dwarf2loc.h) to handle reference values that are not present in
> memory. For instance: extend the property_addr_info structure to
> hold either the address of objects (as today) or the address of the
> referenced object (for reference types).
> 
> Thoughts?

Thanks for looking into that, Pierre-Marie.

My 2 cents, based on the little amount of experience we've had dealing
with dyanmic types in Ada, and the amount of experience we've had
dealing with the GNAT encodings, I have a feeling that it's best to
maintain reference types as being non-dynamic, and enhance the functions
that print reference objects instead. We should probably compare what
Ada does (ada_val_print_ref) compared to C, for instance, as we handle
those reference values correctly, I believe.

-- 
Joel


  reply	other threads:[~2015-04-17 15:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 11:57 Pierre-Marie de Rodat
2015-03-23 13:36 ` Joel Brobecker
2015-04-01  8:52   ` Pierre-Marie de Rodat
2015-04-03  8:45     ` Pierre-Marie de Rodat
2015-04-03 12:47       ` Joel Brobecker
2015-04-03 13:02         ` Pierre-Marie de Rodat
2015-04-03 13:12           ` Joel Brobecker
2015-04-03 13:25             ` Pierre-Marie de Rodat
2015-04-17 10:47       ` Yao Qi
2015-04-17 11:20         ` Pierre-Marie de Rodat
2015-04-17 15:07           ` Pierre-Marie de Rodat
2015-04-17 15:29             ` Joel Brobecker [this message]
2015-04-20 14:27               ` Pierre-Marie de Rodat
2015-04-24 14:22                 ` Pierre-Marie de Rodat

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=20150417153004.GL4704@adacore.com \
    --to=brobecker@adacore.com \
    --cc=derodat@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /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