From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1261 invoked by alias); 11 Mar 2009 17:13:51 -0000 Received: (qmail 1250 invoked by uid 22791); 11 Mar 2009 17:13:51 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Mar 2009 17:13:42 +0000 Received: by yx-out-1718.google.com with SMTP id 3so74645yxi.48 for ; Wed, 11 Mar 2009 10:13:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.30.198 with SMTP id v6mr2047401ibc.26.1236791619637; Wed, 11 Mar 2009 10:13:39 -0700 (PDT) In-Reply-To: References: <20090311153711.GA5197@caradoc.them.org> Date: Wed, 11 Mar 2009 18:37:00 -0000 Message-ID: Subject: Re: [PATCH] PR exp/9103 From: Andre Oliveira Loureiro do Baixo To: tromey@redhat.com Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00157.txt.bz2 Yes, it works in C with no problems at all. Andre On Wed, Mar 11, 2009 at 2:08 PM, Tom Tromey wrote: >>>>>> "Andre" =3D=3D 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 ea= ch > 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. =A0Also, I suspect it won't work in > C, where wchar_t is a typedef. > > Try this patch instead: > > =A0 =A0http://sourceware.org/ml/gdb-patches/2009-01/msg00533.html > > Tom >