From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14221 invoked by alias); 2 Mar 2010 17:59:02 -0000 Received: (qmail 14206 invoked by uid 22791); 2 Mar 2010 17:59:02 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Mar 2010 17:58:57 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o22HwtBi006294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Mar 2010 12:58:55 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o22HwsmE008940; Tue, 2 Mar 2010 12:58:55 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o22HwrrD024251; Tue, 2 Mar 2010 12:58:54 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 6EE98378261; Tue, 2 Mar 2010 10:58:53 -0700 (MST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds 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> <20100301173054.GD5683@calimero.vinschen.de> <20100301193126.GA9416@caradoc.them.org> Reply-To: Tom Tromey Date: Tue, 02 Mar 2010 17:59:00 -0000 In-Reply-To: <20100301193126.GA9416@caradoc.them.org> (Daniel Jacobowitz's message of "Mon, 1 Mar 2010 14:31:31 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (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: 2010-03/txt/msg00063.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: >> Personally, I think that, given the existing nl_langinfo code (and >> worse, Solaris hack) in _initialize_charset, it would be fine to add >> some Cygwin change here. However, I won't approve a patch like that >> over Daniel's objections. Daniel> I don't mind hacks in general. I do mind hacks that are going to Daniel> break my currently working builds. If you build an i686-mingw32 Daniel> to arm-linux debugger, and suddenly that defaults to UTF-16 instead of Daniel> UCS-4, then I've got a problem. Yes, I see what you mean. Sorry for being so dense. Additionally, you're currently exposed to this scenario in the situation where Corinna decides to fix the problem by implementing nl_langinfo(CODESET) in Cygwin ;-) Daniel> What do you suggest? I agree, we need a gdbarch method. Perhaps we should also extend the current "-BE/-LE" hack to look at the width of wchar_t in the user's program. That is, "set target-wide-charset auto" (or perhaps "auto-utf") would select between UTF-16/32/-BE-LE as appropriate. I'll look into this today. Tom