This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[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.


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