This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Variable Length Arrays (VLA) proposal


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]