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

Daniel Jacobowitz
2010-02-28T22:27:11Z

On Sun, Feb 28, 2010 at 08:21:59PM +0100, Corinna Vinschen wrote:
> On Feb 28 13:47, Daniel Jacobowitz wrote:
> > On Sun, Feb 28, 2010 at 04:03:18PM +0100, Corinna Vinschen wrote:
> > > If the codeset is target-specific anyway, then the idea of the
> > > GDB_DEFAULT_TARGET_WIDE_CHARSET and GDB_DEFAULT_TARGET_CHARSET variables
> > > is either wrong, or it must be possible to define them somewhere
> > > on a per-target base. What about windows-tdep.h?
> >
> > If it has to be per-target at all, it needs to go in gdbarch; it can't
> > be a #define any more, because we support multiple compiled-in
> > architectures. This is going to be significantly more complicated,
> > though; there needs to be an "auto (currently cp1252)" style setting.
>
> There is already a setting for the target charsets. We're just
> talking about setting a sane default.

We're talking past each other. Compare show_host_charset_name
(which has an auto setting) to show_target_charset_name (which does
not).

If the default becomes dependent on the target, we need to distinguish
"user specified iso-8859-1" or "user didn't say anything, but now
we're debugging i686-mingw32, and that usually uses cp1252".

--
Daniel Jacobowitz
CodeSourcery