Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <derodat@adacore.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [Ada] Fix handling of array renamings
Date: Thu, 03 Sep 2015 07:27:00 -0000	[thread overview]
Message-ID: <55E7F647.3030700@adacore.com> (raw)
In-Reply-To: <20150902235954.GC3356@adacore.com>

On 09/03/2015 01:59 AM, Joel Brobecker wrote:
> Generally speaking, we try very hard to avoid dereferencing objects,
> especially arrays or structs, as this opens the door for accidently
> fetching the entire object in situations where only one element was
> needed. Since we are dealing with array subscripting, this is
> necessarily the case here.

I guess you are referring to the call to coerce_ref my patch introduces. 
My understanding was that this does not actually fetch the data but 
instead creates a lazy value (see the call to value_at_lazy in 
value.c:coerce_ref) from the reference "pointer", hence not fetching any 
data beyond maybe the reference "pointer" itself.

> Perhaps the object's lifetime is constrained and thus currently would
> never trigger that excessive fetch.

Hm... I don't understand: about what object are you talking? The struct 
value * in GDB? Why does its lifetime influences whether it is fetched?

> But I need to look at the rest of the code in that function more
> carefully to assess it, and I am too short on time now to do it.
>
> I'll review again when I get back...

Sure, there's no hurry. :-) Thank you for reviewing, Joel!

-- 
Pierre-Marie de Rodat


  reply	other threads:[~2015-09-03  7:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  7:21 Pierre-Marie de Rodat
2015-09-02 23:59 ` Joel Brobecker
2015-09-03  7:27   ` Pierre-Marie de Rodat [this message]
2015-09-22 15:00 ` Joel Brobecker
2015-09-23 20:16   ` 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=55E7F647.3030700@adacore.com \
    --to=derodat@adacore.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