From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8189 invoked by alias); 14 Apr 2006 14:08:26 -0000 Received: (qmail 8179 invoked by uid 22791); 14 Apr 2006 14:08:25 -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; Fri, 14 Apr 2006 14:08:24 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-214-179.inter.net.il [83.130.214.179]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DDG03941 (AUTH halo1); Fri, 14 Apr 2006 17:08:17 +0300 (IDT) Date: Fri, 14 Apr 2006 14:23:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus , gdb@sources.redhat.com In-reply-to: <20060414130527.GA12955@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 14 Apr 2006 09:05:27 -0400) Subject: Re: printing wchar_t* Reply-to: Eli Zaretskii References: <200604141257.41690.ghost@cs.msu.su> <20060414130527.GA12955@nevyn.them.org> 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/msg00189.txt.bz2 > Date: Fri, 14 Apr 2006 09:05:27 -0400 > From: Daniel Jacobowitz > Cc: Eli Zaretskii , gdb@sources.redhat.com > > Going away from GDB support for wide characters for a moment, and back to > this; we have a "print N elements" notation; should we extend it to a > "print all non-zero elements" notation? How about "print elements until you find X", where X is any 8-bit code, including zero? That would useful in situations, I think. We will probably need some user-settable limit for the max number of elements, to avoid running amok in case there's no X. > Alternatively, we could do it specially by recognizing wchar_t, but > I think the general solution might be more useful. I agree. > Eli'd know better than me, but I think that expecting wchar_t to be > Unicode is not reliable. I think we cannot assume Unicode is the only character set, but we can make Unicode the default and let the user say otherwise if not.