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: Your INTERMEDIATE_ENCODING patch for Solaris


>>>>> "Kazu" == Kazu Hirata <kazu@codesourcery.com> writes:

Kazu> We've been using a version of your patch posted at:
Kazu>   http://sourceware.org/ml/gdb-patches/2009-07/msg00434.html
Kazu> except that we use
Kazu>   #ifdef __sun__
Kazu> rather than
Kazu>   #ifdef __STDC_ISO_10646__
Kazu> to special case for Solaris.

Kazu> As Andrew replied to your message above, __STDC_ISO_10646__ is not
Kazu> defined on Solaris.  Could we use __sun__ instead?

I am not a Solaris expert, but some digging through the online
OpenSolaris libc sources a few months ago convinced me that the Solaris
wchar_t is in fact not UCS-4.

If that is true, then this patch would be incorrect.

My recollection is that if your locale's encoding was a stateful one,
then the Solaris wchar_t held the state in the high bits and the
character in the low bits; so I suppose this would be one way to try to
test to verify this hypothesis.  A better way would be to check out the
libc and read through it oneself.

This particular problem has come up multiple times.  I am not completely
sure what to do about it, but my current inclination is to change gdb so
that most hosts fall back to PHONY_ICONV, with exceptions for libiconv
and for Linux.  This will at least have gdb default to working, and is
also attractive because I have some hope of actually testing it.

Tom


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