From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25647 invoked by alias); 11 Mar 2009 17:09:05 -0000 Received: (qmail 25636 invoked by uid 22791); 11 Mar 2009 17:09:04 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Mar 2009 17:08:49 +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 n2BH8hJJ011213; Wed, 11 Mar 2009 13:08:44 -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 n2BH8hUf024146; Wed, 11 Mar 2009 13:08:43 -0400 Received: from opsy.redhat.com (vpn-12-67.rdu.redhat.com [10.11.12.67]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2BH8hYB024651; Wed, 11 Mar 2009 13:08:43 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 816DD5082E2; Wed, 11 Mar 2009 11:08:41 -0600 (MDT) To: Andre Oliveira Loureiro do Baixo Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] PR exp/9103 References: <20090311153711.GA5197@caradoc.them.org> From: Tom Tromey Reply-To: tromey@redhat.com Date: Wed, 11 Mar 2009 17:13:00 -0000 In-Reply-To: (Andre Oliveira Loureiro do Baixo's message of "Wed\, 11 Mar 2009 13\:49\:33 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00156.txt.bz2 >>>>> "Andre" == Andre Oliveira Loureiro do Baixo writes: Andre> The patch works correctly because the function inside the modified Andre> condition (val_print_string) scans the string using the size of each Andre> character of the string. This size is passed to the function using the Andre> parameter TYPE_LENGTH (elttype). Char * strings are printed by this Andre> function, the only difference is that wchar_t* strings didn't get Andre> inside the condition, and now they do. Yeah, but it isn't as useful as it could be, because it doesn't properly handle charset conversions. Also, I suspect it won't work in C, where wchar_t is a typedef. Try this patch instead: http://sourceware.org/ml/gdb-patches/2009-01/msg00533.html Tom