From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29415 invoked by alias); 1 Mar 2010 17:28:07 -0000 Received: (qmail 29404 invoked by uid 22791); 1 Mar 2010 17:28:06 -0000 X-SWARE-Spam-Status: No, hits=-6.9 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; Mon, 01 Mar 2010 17:28:01 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o21HRxCv016560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Mar 2010 12:27:59 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o21HRxmo023291; Mon, 1 Mar 2010 12:27:59 -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 o21HRwhp009179; Mon, 1 Mar 2010 12:27:58 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id D7EF7378267; Mon, 1 Mar 2010 10:27:57 -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> <20100301172052.GB32351@caradoc.them.org> Reply-To: tromey@redhat.com Date: Mon, 01 Mar 2010 17:28:00 -0000 In-Reply-To: <20100301172052.GB32351@caradoc.them.org> (Daniel Jacobowitz's message of "Mon, 1 Mar 2010 12:20:52 -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/msg00024.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> On Mon, Mar 01, 2010 at 10:12:00AM -0700, Tom Tromey wrote: Daniel> If the default becomes dependent on the target, we need to distinguish Daniel> "user specified iso-8859-1" or "user didn't say anything, but now Daniel> we're debugging i686-mingw32, and that usually uses cp1252". >> I think the ideal would be to extract this information from the >> inferior. Daniel> I'm not sure I understand what you're suggesting... extract it how? I don't know :-) The only ways I can think of seem pretty fragile -- e.g., for POSIXy systems, extract information from the inferior environment and reproduce the C library logic. FWIW I think target-charset and target-wide-charset should be per-inferior settings, like the environment and arguments. I haven't looked into how to do that, though. I'm also not sure how that would interact with an "auto" setting. Tom