From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10649 invoked by alias); 1 Mar 2010 21:50:46 -0000 Received: (qmail 10641 invoked by uid 22791); 1 Mar 2010 21:50:44 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Mar 2010 21:50:38 +0000 Received: (qmail 23773 invoked from network); 1 Mar 2010 21:50:36 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Mar 2010 21:50:36 -0000 Date: Mon, 01 Mar 2010 21:50:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds Message-ID: <20100301215033.GB17815@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , tromey@redhat.com, gdb-patches@sourceware.org References: <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> <83eik34vr8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83eik34vr8.fsf@gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00035.txt.bz2 On Mon, Mar 01, 2010 at 10:44:43PM +0200, Eli Zaretskii wrote: > It sounds like, for cross debugging, the only fair default is ASCII. > That way, each user will have to set the right target charset, and no > one will feel they are children of a lesser god. This is a target specific setting. Why is there so much resistance to making the target set the property? This is how we handle lots of our other global and target-related state. There's a function, target_wide_charset. It is currently passed a byte order, and consults various globals. It should be passed a gdbarch instead of a byte order, which will require some refactoring but nothing major from my inspection. That's one straightforward patch. target_wide_charset_name can not currently be set to auto. That should be allowed, and the default; if it is "auto", then it should be returned (and "show target-wide-charset" too) as GDB_DEFAULT_TARGET_WIDE_CHARSET. Just like host_charset_name / auto_host_charset name. That's another straightforward patch. Then, GDB_DEFAULT_TARGET_WIDE_CHARSET can become a gdbarch variable. The gdbarch created in i386_cygwin_init_abi can set it to the right thing. The default can be what it is now. This patch is less straightforward because of the existing hacks, like PHONY_ICONV. I'll even offer to help, but I can't promise to help in a timely fashion except with review. -- Daniel Jacobowitz CodeSourcery