This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: [python] another round of fixlets


>>>>> "Volodya" == Vladimir Prus <vladimir@codesourcery.com> writes:

Volodya> 	(gdb) -var-create var0 @ v
Volodya> 	^done,name="var0",numchild="0",value="std::vector of length 0, capacity 0",type="std::vector<int, std::allocator<int> >",thread-id="1",has_more="0"
Volodya> 	(gdb) -exec-next 
Volodya> This steps over push_back, but:
Volodya> 	(gdb) -var-update --all-values *
Volodya> 	^done,changelist=[]

This seems to be intentional:

      /* We probably should not get children of a varobj that has a
	 pretty-printer, but for which -var-list-children was never
	 invoked.  Presumably, such varobj is not yet expanded in the
	 UI, so we need not bother getting it.  */

(I think this comment comes from your original patch from early last
year.)

If I insert a -var-list-children in there, it does work.

I can change this, of course, just let me know if you want that.

Volodya> Also, notice the string value for the varobj -- it's against
Volodya> "std::vector of length..." :-) Initially, I was surprised -- I
Volodya> did not expect the string value for std::vector to differ
Volodya> depending on the number of children it has *now*. We probbly
Volodya> could use the presence of 'children' method in the
Volodya> pretty-printer, or some such, as the criteria?

Yes, I think that is what we must do.

Volodya> But on the other hand, showing {...} as string value and no
Volodya> children at all might be equally confusing... I am not sure
Volodya> what's best here.

We'll have 0 children and has_more==0 -- so I suppose the front end can
display "empty" or something like that.

Tom


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