From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32279 invoked by alias); 1 Mar 2010 17:31:01 -0000 Received: (qmail 32262 invoked by uid 22791); 1 Mar 2010 17:31:00 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 01 Mar 2010 17:30:56 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 6693D6D42F5; Mon, 1 Mar 2010 18:30:54 +0100 (CET) Date: Mon, 01 Mar 2010 17:31:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds Message-ID: <20100301173054.GD5683@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <20100228130500.GG5683@calimero.vinschen.de> <20100228142905.GB1556@caradoc.them.org> <20100228150318.GA32463@calimero.vinschen.de> <20100228184749.GA17375@caradoc.them.org> <20100228192159.GP5683@calimero.vinschen.de> <20100228222702.GC29360@caradoc.them.org> <20100301103125.GB9730@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-03/txt/msg00026.txt.bz2 On Mar 1 10:21, Tom Tromey wrote: > >>>>> "Corinna" == Corinna Vinschen writes: > > Corinna> +void > Corinna> +set_auto_target_wide_charset (char *charset) > > Argument should be const. > > Corinna> +void > Corinna> +set_auto_target_charset (char *charset) > > Likewise. > > I think the documentation for these functions (in charset.h) should > mention the expected lifetime of the arguments. I don't understand. What do you mean by "expected lifetime"?!? > Corinna> @@ -874,7 +917,7 @@ _initialize_charset (void) > [...] > Corinna> + auto_target_charset_name = auto_host_charset_name; > > Corinna> _initialize_windows_nat (void) > [...] > Corinna> + set_auto_target_charset ("UTF-8"); > > This seems to introduce an ordering dependency between _initialize > functions. My understanding is that we don't allow this. It's just a default. The default of UTF-32 breaks wide char support for UTF-16 targets. A native Cygwin or MingW GDB should have a sane default for the target charsets. That's all I'm trying to accomplish. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat