This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
[Python/MI] String value for classes
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Fri, 12 Jun 2009 22:04:36 +0400
- Subject: [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