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: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 01 Mar 2010 12:25:47 -0700
- 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> <20100301173054.GD5683@calimero.vinschen.de>
- Reply-to: tromey at redhat dot com
>>>>> "Corinna" == Corinna Vinschen <vinschen@redhat.com> writes:
Tom> I think the documentation for these functions (in charset.h) should
Tom> mention the expected lifetime of the arguments.
Corinna> I don't understand. What do you mean by "expected lifetime"?!?
The argument string must not be freed by the caller.
Tom> This seems to introduce an ordering dependency between _initialize
Tom> functions. My understanding is that we don't allow this.
Corinna> It's just a default. The default of UTF-32 breaks wide char
Corinna> support for UTF-16 targets. A native Cygwin or MingW GDB
Corinna> should have a sane default for the target charsets. That's all
Corinna> I'm trying to accomplish.
Yes, I understand. The problem here is that if the init functions are
ordered one way, then your patch installs one default, but if they are
ordered another way, then your patch installs a different default.
Personally, I think that, given the existing nl_langinfo code (and
worse, Solaris hack) in _initialize_charset, it would be fine to add
some Cygwin change here. However, I won't approve a patch like that
over Daniel's objections.
Tom