This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] Another comment that... needs a comment! ;)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Cc: Nathan Myers <ncm at cantrip dot org>
- Date: Mon, 19 Jan 2004 12:11:45 +0100
- Subject: [RFC] Another comment that... needs a comment! ;)
Hi again,
in basic_string.h:
* The reason you want _M_data pointing to the character array and
* not the _Rep is so that the debugger can see the string
* contents. (Probably we should add a non-inline member to get
* the _Rep for the debugger to use, so users can check the actual
* string length.)
Now, if I do, with gdb6.0 (from DDD):
(gdb) p str
$1 = {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x400f78dc ""}}
therefore, it looks like current gdbs is able to look inside
_M_dataplus (struct _Alloc_hider) and display _M_p directly...
Comments? Possible implications?
Thanks!
Paolo.