Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Bernhard Heckel <bernhard.heckel@intel.com>
Cc: qiyaoltc@gmail.com, eliz@gnu.org, gdb-patches@sourceware.org
Subject: Re: [PATCH V2 3/5] Fortran: Resolve dynamic target types of pointers.
Date: Tue, 05 Jul 2016 15:51:00 -0000	[thread overview]
Message-ID: <20160705155142.GI3295@adacore.com> (raw)
In-Reply-To: <577BD2C1.5050409@intel.com>

> we could resolve the target when we actually access it -> value_ind.
> As far as I know there is one corner case, when we print the address
> and the target type has an DATA_LOCATION attribute. But I don't find
> the code at the moment.
> 
> Nevertheless, with your input it is becomes questionable if we should
> resolve structures and references.
> Fields of structures could be resolved when we access them ->
> value_struct_elt. What do you think?

For structures, I think we resolve its elements so we can know the
structure's size. There is a huge comment in ada-lang.c about
type 'fixing', which is hacky-before-go-lucky-dynamic-type-handling
was introduced in GDB. It explains in fairly good detail when we
do the resolution (we called it "fixing"), and why we do it at that
time. With the new infrastructure, we could possibly do more resolution
lazily, but I would focus on that later if it turns out that the only
benefit of that is performance improvement.

-- 
Joel


  reply	other threads:[~2016-07-05 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  9:52 [PATCH V2 0/5] Fortran: Resolve " Bernhard Heckel
2016-07-04  9:52 ` [PATCH V2 4/5] Fortran: Fix query of address of not-allocated types Bernhard Heckel
2016-07-04  9:52 ` [PATCH V2 2/5] Fortran: Testsuite, add print of pointer types Bernhard Heckel
2016-07-04  9:52 ` [PATCH V2 5/5] Fortran: Handle cyclic pointers Bernhard Heckel
2016-07-04  9:52 ` [PATCH V2 3/5] Fortran: Resolve dynamic target types of pointers Bernhard Heckel
2016-07-04 15:01   ` Eli Zaretskii
2016-07-05 14:35   ` Joel Brobecker
2016-07-05 15:31     ` Bernhard Heckel
2016-07-05 15:51       ` Joel Brobecker [this message]
2016-07-04  9:52 ` [PATCH V2 1/5] Fortran: Typeprint, fix dangling types Bernhard Heckel

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=20160705155142.GI3295@adacore.com \
    --to=brobecker@adacore.com \
    --cc=bernhard.heckel@intel.com \
    --cc=eliz@gnu.org \
    --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