From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23876 invoked by alias); 11 Mar 2009 16:49:43 -0000 Received: (qmail 23864 invoked by uid 22791); 11 Mar 2009 16:49:42 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.245) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Mar 2009 16:49:35 +0000 Received: by an-out-0708.google.com with SMTP id d14so66060and.3 for ; Wed, 11 Mar 2009 09:49:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.16.74 with SMTP id n10mr2039983iba.28.1236790173522; Wed, 11 Mar 2009 09:49:33 -0700 (PDT) In-Reply-To: <20090311153711.GA5197@caradoc.them.org> References: <20090311153711.GA5197@caradoc.them.org> Date: Wed, 11 Mar 2009 17:09:00 -0000 Message-ID: Subject: Re: [PATCH] PR exp/9103 From: Andre Oliveira Loureiro do Baixo To: Andre Oliveira Loureiro do Baixo , 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/msg00155.txt.bz2 The patch works correctly because the function inside the modified condition (val_print_string) scans the string using the size of each character of the string. This size is passed to the function using the parameter TYPE_LENGTH (elttype). Char * strings are printed by this function, the only difference is that wchar_t* strings didn't get inside the condition, and now they do. Andr=E9 Oliveira Loureiro do Baixo On Wed, Mar 11, 2009 at 12:37 PM, Daniel Jacobowitz wrote: > On Wed, Mar 11, 2009 at 12:25:26PM -0300, Andre Oliveira Loureiro do Baix= o wrote: >> There is a bug filled in about GDB not printing (wchar_t *) strings in: >> >> http://sourceware.org/bugzilla/show_bug.cgi?id=3D9103 >> >> This patch solves this bug. > > You need to coordinate with Tom, who is working on a bigger solution > to this. =A0I don't see how your patch can work correctly since the rest > of GDB doesn't know how to convert wide characters into displayable > text. > > -- > Daniel Jacobowitz > CodeSourcery >