From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32197 invoked by alias); 14 Apr 2006 08:07:34 -0000 Received: (qmail 32169 invoked by uid 22791); 14 Apr 2006 08:07:33 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Apr 2006 08:07:31 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-89-169.inter.net.il [80.230.89.169]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DZC41795 (AUTH halo1); Fri, 14 Apr 2006 11:07:21 +0300 (IDT) Date: Fri, 14 Apr 2006 08:43:00 -0000 Message-Id: From: Eli Zaretskii To: "Jim Blandy" CC: ghost@cs.msu.su, gdb@sources.redhat.com In-reply-to: <8f2776cb0604131106q7fef0342ic5d0b4990b42b66a@mail.gmail.com> (jimb@red-bean.com) Subject: Re: printing wchar_t* Reply-to: Eli Zaretskii References: <8f2776cb0604131031g370d6fa9p9361421bd21d178@mail.gmail.com> <8f2776cb0604131106q7fef0342ic5d0b4990b42b66a@mail.gmail.com> 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/msg00171.txt.bz2 > Date: Thu, 13 Apr 2006 11:06:12 -0700 > From: "Jim Blandy" > Cc: ghost@cs.msu.su, gdb@sources.redhat.com > > On 4/13/06, Eli Zaretskii wrote: > > > Date: Thu, 13 Apr 2006 10:31:18 -0700 > > > From: "Jim Blandy" > > > Cc: gdb@sources.redhat.com > > > > > > The best approach would be to extend charset.[ch] to handle wide > > > character sets as well, and then add code to the language-specific > > > printing routines to use the charset functions. (This is fortunately > > > much simpler than adding support for multibyte characters.) > > > > Can you tell why you think it's much simpler? > > Okay --- just to be clear, this is about multi-byte characters, not > wide characters, which is what Volodya was asking about. It's both, as far as I'm concerned: I was asking to explain why you think supporting wide characters is much easier than supporting multi-byte characters. > - I don't think GDB should use off-the-shelf conversion stuff like > iconv. For example, if you're looking at ISO-2022 text with the > character set switching escape codes in there, I'd argue it'd be wrong > for GDB to display those strings without showing the escape codes. > It's a debugger, so people are looking at strings and corresponding > indexes into those strings, and they need to be able to see exactly > what's in there. iconv handles the escape codes silently. If we add such a support, we should probably have GDB print both the raw and printable representation of the non-ASCII strings. We already do something similar with char data type.