This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: GDB/MI - var-update/create BUG
- From: "Andrew Burgess" <aburgess at broadcom dot com>
- To: "Eran Ifrah" <eran dot ifrah at gmail dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 27 Oct 2010 00:50:03 -0700
- Subject: RE: GDB/MI - var-update/create BUG
- References: <AANLkTinUo3LMBBmDWPm_jp2md3Xzi=06NBf2qJ2S6NF2@mail.gmail.com>
> On 26 October 2010 23:02, Behalf Of Eran Ifrah wrote:
>
> Here is the debug session for the above code:
>
> ( starting from first line of main() )
> (gdb)
> -var-create - * mystr._M_dataplus._M_p
> ^done,name="var1",numchild="1",value="0x28ff28 \"h\\377(\"",type="char
> *",thread-id="1",has_more="0"
Using "*" ties the creation of the variable to the current frame. Changing to use "@" will create a floating variable that will use the current _active_ frame. This seems to produce the result you are looking for.
Thanks,
Andrew