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: GDB/MI - var-update/create BUG


> 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


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