This is the mail archive of the gdb-prs@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]

[Bug python/16020] Print trailing nul in c++ std::string?


https://sourceware.org/bugzilla/show_bug.cgi?id=16020

Ben Longbons <b.r.longbons at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b.r.longbons at gmail dot com

--- Comment #1 from Ben Longbons <b.r.longbons at gmail dot com> ---
You can get the right behavior by adding 1 to the length in the libstdc++
printer.

But the actual bug is that gdb is unconditionally removing a single trailing \0
from all strings. It makes sense for the builtin char[] printing, but not for
things passed from python.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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