This is the mail archive of the gdb-patches@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: Patch: implement new dynamic varobj spec


 > > It's probably unusual for the key to be a structure 
 > 
 > Rather, it's very typical in C++. std::map<std::string, whatever> is used
 > all over.

A string is represented by a single value like a scalar.  The case being
considered was  "a struct or some other complicated varobj with children".

 >...
 > > -var-create - * m1
 > > -var-list-children -var1
 > > 
 > >    var1.0       = "map_element"
 > >    var1.0.key   = key0
 > >    var1.0.key.a = 5
 > >    var1.0.key.b = 7.5
 > >    var1.0.value = "a string"
 > 
 > What if 'values' wishes to have a field named 'key'? 

I don't understand.  The frontend would know from var1.0 that key value pairs
follow.  So presumably:

    var1.0.key.key = 5

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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