From: "Fredrik Orderud" <fredrik.orderud@idi.ntnu.no>
To: <gdb@sourceware.org>
Subject: Display content of unicode std::wstring objects
Date: Fri, 15 Aug 2008 18:26:00 -0000 [thread overview]
Message-ID: <8DAABA4DED90428A886BEAEBD9C8AFCB@Orderud> (raw)
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
next reply other threads:[~2008-08-15 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 18:26 Fredrik Orderud [this message]
2008-08-15 20:04 ` Paul Pluzhnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8DAABA4DED90428A886BEAEBD9C8AFCB@Orderud \
--to=fredrik.orderud@idi.ntnu.no \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox