From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5783 invoked by alias); 13 Apr 2006 16:15:37 -0000 Received: (qmail 5756 invoked by uid 22791); 13 Apr 2006 16:15:36 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Apr 2006 16:15:31 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-246-188.inter.net.il [83.130.246.188]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DDD23786 (AUTH halo1); Thu, 13 Apr 2006 19:15:26 +0300 (IDT) Date: Thu, 13 Apr 2006 17:25:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb@sources.redhat.com In-reply-to: (message from Vladimir Prus on Thu, 13 Apr 2006 20:04:32 +0400) Subject: Re: printing wchar_t* Reply-to: Eli Zaretskii References: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00160.txt.bz2 > From: Vladimir Prus > Date: Thu, 13 Apr 2006 20:04:32 +0400 > > at the moment, gdb seem to provide no support for printing wchar_t* values. > It prints them like this: > > (gdb) print p15 > print p15 > $486 = (wchar_t *) 0x80489f8 > > Is there any "standard" way to make gdb automatically traverse wchar_t*, > printing values, and stopping at '0' value. What character set is used by the wide characters in the wchar_t arrays? GDB has some support for a few single-byte character sets, see the node "Character Sets" in the manual. > I have a user-defined command that can produce the output I want, but is > defining a custom command the right approach? It's one possibility, the other one being to call a function in the debuggee to produce the string. Yet another possibility is to do the conversion in your GUI front end.