Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Chris January <chris.january@allinea.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: Variable Length Arrays (VLA) proposal
Date: Mon, 01 Jul 2013 08:01:00 -0000	[thread overview]
Message-ID: <1372665705.3234.3.camel@gumtree> (raw)
In-Reply-To: <20130701015453.GB10319@adacore.com>

On Sun, 2013-06-30 at 18:54 -0700, Joel Brobecker wrote:
> > Just to add another possibility, we implemented VLA for Fortran by
> > wrapping read_var_value and then adding a call to f_fixup_value which
> > 'fixed up' the type of the variable (filled in the array bounds, etc.)
> > by modifying the original type. (It also auto-dereferences pointers).
> 
> One of the questions that need to be asked is whether it's OK to modify
> the type in place like that. For Ada, we create new types with the
> bounds fixed-up. I think you might run into problems with cached
> values, such as the values accessible from the history (Eg: "print $2").

Do you mean in this scenario (excuse the mixed Fortran / GDB commands)?

ALLOCATE(array(10, 10))
(gdb) print array
$1 = (...)
DEALLOCATE(array)
ALLOCATE(array(20,20))
(gdb) print $1

Then no, modifying the original type does not work in that case (it
breaks $1 as you say).

Chris



  reply	other threads:[~2013-07-01  8:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 13:03 Agovic, Sanimir
2013-06-28 15:40 ` Chris January
2013-07-01  1:55   ` Joel Brobecker
2013-07-01  8:01     ` Chris January [this message]
2013-07-01 15:32   ` Agovic, Sanimir
2013-07-04  8:18   ` Agovic, Sanimir
2013-07-04  9:13     ` Chris January
2013-07-04 11:49       ` Agovic, Sanimir
2013-07-04 16:55         ` Chris January
2013-07-26 11:44           ` Agovic, Sanimir
     [not found]     ` <1372928011.2796.13.camel@gumtree>
2013-07-04 10:00       ` Chris January
2013-07-02 13:37 ` Jan Kratochvil
2013-07-02 19:21   ` Jan Kratochvil
2013-07-02 22:22     ` Joel Brobecker
2013-07-04 12:32   ` Keven Boell
2013-08-04 19:33     ` Jan Kratochvil
2013-08-07  5:25       ` Keven Boell
2013-08-04 19:02 ` Jan Kratochvil

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=1372665705.3234.3.camel@gumtree \
    --to=chris.january@allinea.com \
    --cc=brobecker@adacore.com \
    --cc=gdb@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