From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7104 invoked by alias); 13 Oct 2008 18:48:22 -0000 Received: (qmail 7096 invoked by uid 22791); 13 Oct 2008 18:48:21 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Oct 2008 18:47:46 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9DIlYBF022966; Mon, 13 Oct 2008 14:47:34 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9DIlWRo018560; Mon, 13 Oct 2008 14:47:32 -0400 Received: from opsy.redhat.com (vpn-13-182.rdu.redhat.com [10.11.13.182]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9DIlWDp003179; Mon, 13 Oct 2008 14:47:32 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 51379378107; Mon, 13 Oct 2008 11:26:24 -0600 (MDT) To: "Yifan Wang" Cc: gdb@sourceware.org Subject: Re: gdb support for wide char References: From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Mon, 13 Oct 2008 18:48:00 -0000 In-Reply-To: (Yifan Wang's message of "Mon\, 13 Oct 2008 10\:55\:52 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-10/txt/msg00057.txt.bz2 >>>>> "Yifan" == Yifan Wang writes: Yifan> and now i am working on utf8 which is not fixed length character. Yifan> The solution rely on the glibc functions, eg.mbstowcs(), iconv(), to Yifan> support wide character. Yifan> I dont know whether this solution is good enough, because it Yifan> does not support other programming language and it rely on the Yifan> glibc functions. Is it calling these functions in the inferior? If so, then I think it would be preferable to use iconv in gdb, and not call any inferior functions. This approach has several advantages: it works with core files, it works with other languages, and (due to the existence of libiconv) it is more portable. If not, I think I am not understanding something. Tom