This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 1 Mar 2010 18:30:54 +0100
- Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds
- References: <20100228130500.GG5683@calimero.vinschen.de> <20100228142905.GB1556@caradoc.them.org> <20100228150318.GA32463@calimero.vinschen.de> <20100228184749.GA17375@caradoc.them.org> <20100228192159.GP5683@calimero.vinschen.de> <20100228222702.GC29360@caradoc.them.org> <20100301103125.GB9730@calimero.vinschen.de> <m3fx4khsa0.fsf@fleche.redhat.com>
- Reply-to: gdb-patches at sourceware dot org
On Mar 1 10:21, Tom Tromey wrote:
> >>>>> "Corinna" == Corinna Vinschen <vinschen@redhat.com> writes:
>
> Corinna> +void
> Corinna> +set_auto_target_wide_charset (char *charset)
>
> Argument should be const.
>
> Corinna> +void
> Corinna> +set_auto_target_charset (char *charset)
>
> Likewise.
>
> I think the documentation for these functions (in charset.h) should
> mention the expected lifetime of the arguments.
I don't understand. What do you mean by "expected lifetime"?!?
> Corinna> @@ -874,7 +917,7 @@ _initialize_charset (void)
> [...]
> Corinna> + auto_target_charset_name = auto_host_charset_name;
>
> Corinna> _initialize_windows_nat (void)
> [...]
> Corinna> + set_auto_target_charset ("UTF-8");
>
> This seems to introduce an ordering dependency between _initialize
> functions. My understanding is that we don't allow this.
It's just a default. The default of UTF-32 breaks wide char support for
UTF-16 targets. A native Cygwin or MingW GDB should have a sane default
for the target charsets. That's all I'm trying to accomplish.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat