Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Alexey Feldgendler" <alexeyf@opera.com>
To: gdb-patches@sourceware.org
Subject: Re: Default target wide character set
Date: Thu, 17 Sep 2009 08:50:00 -0000	[thread overview]
Message-ID: <op.u0d76qg756e9f9@xman.oslo.opera.com> (raw)
In-Reply-To: <m3ljkepvlz.fsf@fleche.redhat.com>

On Wed, 16 Sep 2009 20:55:52 +0200, Tom Tromey <tromey@redhat.com> wrote:

> I don't know your copyright assignment situation, but if you are
> planning to submit patches, it doesn't hurt to get started on that
> early.  Send me email off-list if you want to do this.

Sure, I'll make any small fix that makes sense on its own as a separate  
patch.

Alexey>> Side question: how does gdb figure out sizeof(wchar_t)? Does it
Alexey>> come from the symbol table or from elsewhere?

> Yeah, look in c-lang.c for a call to lookup_typename with an argument of
> "wchar_t".  The resulting type can be queried for its attributes.

What happens then no symbol table is available?

> What I would propose doing is adding a new charset named "UCS".  If this
> is selected as the target wide charset, then we would automatically pick
> UCS-2 or UCS-4 depending on sizeof(target wchar_t).  This would probably
> mean having a few special cases in the code (like we do for the -BE and
> -LE variants).  We would then make this the default target wide charset.
>
> What do you think of that?

I think it's a very good idea. Indeed, it's much more user-friendly to  
have an auto-sensing option with clearly defined semantics.

On Wed, 16 Sep 2009 22:40:01 +0200, Eli Zaretskii <eliz@gnu.org> wrote:

> AFAIK, Windows (whose wchar_t is 16-bit) uses UTF-16, not UCS-2.
>
> What other platforms have a 16-bit wchar_t, and are you sure any
> significant portion of them use UCS-2 (which is an obsolete encoding,
> AFAIK)?

Because UCS-2 is a subset of UTF-16, it won't hurt to just change all uses  
of UCS-2 in gdb to UTF-16.

On Wed, 16 Sep 2009 22:46:30 +0200, Tom Tromey <tromey@redhat.com> wrote:

> We could name it "auto" then.

I agree, and make it default.

Seems we agree here, I'll submit a patch soon.


-- 
Alexey Feldgendler
Software Developer, Desktop Team, Opera Software ASA
[ICQ: 115226275] http://my.opera.com/feldgendler/


  parent reply	other threads:[~2009-09-17  8:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 14:12 Alexey Feldgendler
2009-09-16 18:56 ` Tom Tromey
2009-09-16 19:11   ` Pedro Alves
2009-09-16 20:41     ` Eli Zaretskii
2009-09-16 20:46       ` Tom Tromey
2009-09-17 10:25       ` Pedro Alves
2009-09-16 20:40   ` Eli Zaretskii
2009-09-16 20:46     ` Tom Tromey
2009-09-16 20:54       ` Eli Zaretskii
2009-09-17  8:50   ` Alexey Feldgendler [this message]
2009-09-18 20:42     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.u0d76qg756e9f9@xman.oslo.opera.com \
    --to=alexeyf@opera.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox