This is the mail archive of the
mailing list for the GDB project.
Re: Configuring gdb_wchar.h
> Cc: email@example.com
> From: Tom Tromey <firstname.lastname@example.org>
> Date: Tue, 14 Apr 2009 18:23:25 -0600
> Here's an updated patch that changes charset.c to use pexecute and to
> detect errors. It also adds parsing for libiconv-style "iconv -l"
> I tried this with the glibc iconv, libiconv's iconv, and a phony iconv
> that prints garbage and exits with an error.
> If you want to give it a try, to make sure it still builds on DJGPP,
> that would be nice. If it works for you I will check it in.
It builds fine, but the result seems strange to me: GDB now lists a
long list of character sets in response to "set target-charset TAB".
What happens is that find_charset_names correctly notices that
"iconv -l" exited with a non-zero status (this is still with libiconv 1.7,
where the -l switch is not supported), but then _initialize_charset
falls back on using DEFAULT_CHARSET_NAMES, which seem to assume a
glibc-based system. I rather expected the result to be that only a
single target charset be available. Am I missing something? Should
DEFAULT_CHARSET_NAMES be redefined on DJGPP to something different
from what charset-list.h defines it?
I will upgrade to a newer libiconv and try with that, once the result
for 1.7 is as expected (whatever that might be).