This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Variable Length Arrays (VLA) proposal
- From: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- To: Chris January <chris dot january at allinea dot com>, Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>, "Boell, Keven" <keven dot boell at intel dot com>
- Date: Mon, 1 Jul 2013 15:29:18 +0000
- Subject: RE: Variable Length Arrays (VLA) proposal
- References: <0377C58828D86C4588AEEC42FC3B85A7176288F9 at IRSMSX105 dot ger dot corp dot intel dot com> <1372434039 dot 2950 dot 12 dot camel at gumtree> <20130701015453 dot GB10319 at adacore dot com> <1372665705 dot 3234 dot 3 dot camel at gumtree>
Hello Chris,
> 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).
Afaik the history ($n) is simply a snapshot of the printed value. Thus
modifying the type in place changes the semantic of the history.
Not sure what happens if the inferior changes or one unloads debug
information though.
-Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052