This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 28 Feb 2010 09:29:06 -0500
- Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds
- References: <20100228130500.GG5683@calimero.vinschen.de>
On Sun, Feb 28, 2010 at 02:05:00PM +0100, Corinna Vinschen wrote:
> Hi,
>
> today I tested the wide char printing in GDB for the furst time on a
> Cygwin build and it didn't work well. The reson was that the default
> for GDB_DEFAULT_TARGET_WIDE_CHARSET is UTF-32, which is bad for a system
> defining wchar_t to be UTF-16. That's Windows for you.
>
> So I applied the below patch, which makes GDB for Cygwin happy. I also
> set the GDB_DEFAULT_TARGET_CHARSET for Cygwin and Win32 to a more sane
> default for both systems.
>
>
> Ok to apply?
No, this isn't right. __CYGWIN__ and _WIN32 are host checks, and
these charsets are target properties. So this will not have the
desired effect.
Hmm, does this mean these macros should become gdbarch properties?
That could be awkward in practice.
--
Daniel Jacobowitz
CodeSourcery