[Python/MI] String value for classes
Vladimir Prus
ghost@cs.msu.su
Fri Jun 12 18:04:00 GMT 2009
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
More information about the Gdb
mailing list