From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28090 invoked by alias); 13 Apr 2006 16:04:56 -0000 Received: (qmail 28081 invoked by uid 22791); 13 Apr 2006 16:04:55 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Apr 2006 16:04:51 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FU4JH-0003vW-Hb for gdb@sources.redhat.com; Thu, 13 Apr 2006 18:04:43 +0200 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Apr 2006 18:04:43 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Apr 2006 18:04:43 +0200 To: gdb@sources.redhat.com From: Vladimir Prus Subject: printing wchar_t* Date: Thu, 13 Apr 2006 17:07:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 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/msg00159.txt.bz2 Hi, 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. I don't care much how it's actually printed, for example, printing raw hex values will work: 0x56, 0x1456 or using \u escapes: 'test\u1234' or whatever. I have a user-defined command that can produce the output I want, but is defining a custom command the right approach? - Volodya