On 01/12/2016 07:58 AM, Pedro Alves wrote: > [snip] > > Could you indent this, like: > > #ifdef USE_WIN32API > # define GDB_DEFAULT_HOST_CHARSET "CP1252" > #else > # define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" > #endif Done. >> +/* We allow conversions from UTF-32, wchar_t, and the host charset. >> + We allow conversions to wchar_t and the host charset > > Missing period. > >> + Return 1 if we are converting from UTF-32BE, 2 if from UTF32-LE, >> + 0 otherwise. This is used as a flag in calls to iconv. */ > > Spurious double space after "This is". Both fixed now. > Isn't this the same as: > > enum bfd_endian endian = utf_flag == 1 ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE; > extract_unsigned_integer (*inbuf, 4, endian); > > ? That looks much nicer. :-) Fixed. >> @@ -290,6 +315,10 @@ set_be_le_names (struct gdbarch *gdbarch) >> return; >> be_le_arch = gdbarch; >> >> +#ifdef PHONY_ICONV >> + target_wide_charset_le_name = "UTF-32LE"; >> + target_wide_charset_be_name = "UTF-32BE"; >> +#else >> target_wide_charset_le_name = NULL; >> target_wide_charset_be_name = NULL; >> >> @@ -313,6 +342,7 @@ set_be_le_names (struct gdbarch *gdbarch) >> target_wide_charset_le_name = charset_enum[i]; >> } >> } >> +# endif /* PHONY_ICONV */ > > This change isn't obvious to me. You wrote in the ChangeLog: > >> (set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match >> phony_iconv_open. > > But I think this "to match" comment should be here in the sources. Done. > Otherwise LGTM. New patch attached. Is this one OK to commit? -Sandra