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]

[Python/MI] String value for classes


At present, when using libstdc++ pretty-printers, I get this:

	(gdb) -var-create var11 @ v
	^done,name="var11",numchild="2",value="std::vector of length 2, capacity 2",
    type="std::vector<int, std::allocator<int> >",thread-id="1"

The example UI display can be found at:

	http://lvk.cs.msu.su/~ghost/vector.jpg

where the "value" of vector runs over the variable tooltop. In general, CLI
has 80 characters of width, so the above value is fine and good. In IDE,
the variable window, or variable tooltip, is usually much narrower, and
it seems reasonable if MI make better use of width.

Therefore, I would suggest that for MI, pretty printed structures that
are collections are shown just as "[N]". How to implement that is a
separate matter, but let's decide on desired behaviour first.

- Volodya


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