This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]