This is the mail archive of the gdb@sources.redhat.com 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]

variable objects (was: [rfc] Annotation level THREE)


Andrew Cagney writes:
 > > -var-create - * i
 > > ^done,name="var1",numchild="0",type="int"
 > > (gdb) 
 > > -var-create - * r
 > > ^done,name="var2",numchild="10",type="double [10]"
 > > (gdb) 
 > > set var i=3
 > 
 > Do -var-assign or -var-evaluate-expression work?  Regardless, this looks 
 > like a bug.
 > 
 > > &"set var i=3\n"
 > > ^done
 > > (gdb) 
 > > -var-update *
 > > ^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]
 > > (gdb) 
 > > set var r[3]=6
 > > &"set var r[3]=6\n"
 > > ^done
 > > (gdb) 
 > > -var-update *
 > > ^done,changelist=[]
 > > (gdb) 
 > 

If -var-assign is used (or, indeed, if the array element is changed within
execution) then the changelist reflects this e.g

-var-assign var2.3 6
^done,value="6"
(gdb) 
-var-update *
^done,changelist=[{name="var2.3",in_scope="true",type_changed="false"}]
(gdb) 

-var-evaluate-expression gives the following:

-var-evaluate-expression var2
^done,value="[10]"
(gdb) 

which possibly explains why nothing appears in the changelist when the CLI
command (set var r[3]=6) is used as the array size is not editable:

-var-show-attributes var2
^done,attr="noneditable"
(gdb) 


This is only a problem when trying to control GDB using both CLI and MI
commands which is what we would like to do in Emacs. Do Apple (Project 
Builder?) or Eclipse have a console where CLI commands can be entered?

Nick



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