From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12757 invoked by alias); 17 Oct 2012 18:43:47 -0000 Received: (qmail 12747 invoked by uid 22791); 17 Oct 2012 18:43:45 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Oct 2012 18:43:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5E1A11C77A3; Wed, 17 Oct 2012 14:43:39 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JVxCQpqYgBH8; Wed, 17 Oct 2012 14:43:39 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2D7321C76EF; Wed, 17 Oct 2012 14:43:39 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 65158C4B88; Wed, 17 Oct 2012 11:43:31 -0700 (PDT) Date: Wed, 17 Oct 2012 18:43:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: printing 0xbeef wchar_t on x86-windows... Message-ID: <20121017184331.GO3050@adacore.com> References: <20121015190052.GH3034@adacore.com> <87wqyq6tcl.fsf@fleche.redhat.com> <20121016224342.GH3050@adacore.com> <87fw5d7uck.fsf@fleche.redhat.com> <20121017145806.GK3050@adacore.com> <878vb52bsi.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878vb52bsi.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-10/txt/msg00299.txt.bz2 > FWIW the appended builds and regtests ok; but really it needs testing in > your environment. Already done :-). But JIC, I applied your patch, and tested it again, and same (good) results. Would you like me to commit it for you? Thanks, Tom. > diff --git a/gdb/valprint.c b/gdb/valprint.c > index 6e651f6..583329d 100644 > --- a/gdb/valprint.c > +++ b/gdb/valprint.c > @@ -2037,7 +2037,7 @@ generic_emit_char (int c, struct type *type, struct ui_file *stream, > convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (), > obstack_base (&wchar_buf), > obstack_object_size (&wchar_buf), > - 1, &output, translit_char); > + sizeof (gdb_wchar_t), &output, translit_char); > obstack_1grow (&output, '\0'); > > fputs_filtered (obstack_base (&output), stream); > @@ -2278,7 +2278,7 @@ generic_printstr (struct ui_file *stream, struct type *type, > convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (), > obstack_base (&wchar_buf), > obstack_object_size (&wchar_buf), > - 1, &output, translit_char); > + sizeof (gdb_wchar_t), &output, translit_char); > obstack_1grow (&output, '\0'); > > fputs_filtered (obstack_base (&output), stream); -- Joel