From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2093 invoked by alias); 15 Aug 2008 13:13:40 -0000 Received: (qmail 2085 invoked by uid 22791); 15 Aug 2008 13:13:40 -0000 X-Spam-Check-By: sourceware.org Received: from pil.idi.ntnu.no (HELO pil.idi.ntnu.no) (129.241.107.93) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Aug 2008 13:13:01 +0000 Received: from Orderud (D-172241-DHCP.medisin.ntnu.no [129.241.172.241]) (authenticated bits=0) by pil.idi.ntnu.no (8.14.1/8.13.5) with ESMTP id m7FDCv03013401 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Fri, 15 Aug 2008 15:12:57 +0200 (MEST) Message-ID: <8DAABA4DED90428A886BEAEBD9C8AFCB@Orderud> From: "Fredrik Orderud" To: Subject: Display content of unicode std::wstring objects Date: Fri, 15 Aug 2008 18:26:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Windows Mail 6.0.6001.18000 X-Virus-Scanned-By: mimedefang.idi.ntnu.no, using CLAMD X-SMTP-From: Sender=, Relay/Client=D-172241-DHCP.medisin.ntnu.no [129.241.172.241], EHLO=Orderud X-Filter-Time: 1 seconds Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00187.txt.bz2 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