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

Display content of unicode std::wstring objects


Is there any in-build support for displaying the content of C++ STL unicode text-strings in gdb?

In my C++ program I have a lot of std::wstring objects, and I want a convenient way to display the content of these unicode strings from gdb whenever I break my program. Currently, I just dump the content of the memory area manually with "x/20c str_obj._M_dataplus._M_p" (for a "std::wstring str_obj" object), but this is inconvenient due to the "_M_dataplus._M_p" subfields and results in a very verbose listing. You also need to know the string length in advance with this approach.

On my machine I run Fedora linux 9, with gcc/g++ 4.3.0 and gdb 6.8.

Thanks in advance
Fredrik Orderud



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