public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: Eli Zaretskii <eliz@elta.co.il>,
	ezannoni@redhat.com, gdb@sources.redhat.com
Subject: Re: charset.c problem with non-en_US locales
Date: Thu, 24 Apr 2003 20:26:00 -0000	[thread overview]
Message-ID: <3EA84866.9040702@redhat.com> (raw)
In-Reply-To: <vt2u1cok4aq.fsf@zenia.red-bean.com>

> Andrew Cagney <ac131313@redhat.com> writes:
> 
>> Hmm,
>> 
>> 	(gdb) set charset <tab>
>> 
>> doesn't work.  If that was fixed (using GDB's enum cli method), the
>> command would become case sensitive.  Since GDB's CLI is case
>> sensative in general that would make sense.
> 
> 
> Actually, the CLI is inconsistent:
> 
>     zenia:jimb$ gdb
>     GNU gdb 2003-04-17-cvs
>     Copyright 2003 Free Software Foundation, Inc.
>     ...
>     Type "show copying" to see the conditions.
>     There is absolutely no warranty for GDB.  Type "show warranty" for details.
>     This GDB was configured as "i686-pc-linux-gnu".
>     (gdb) print 0
>     $1 = 0
>     (gdb) PRINT 0
>     $2 = 0
>     (gdb) PrInT 0
>     $3 = 0
>     (gdb)

Dig, dig.  Ulgh!  That was added as part of the HP merge ..., part of 
xdb compatibility?   As best I can tell, prior to Dec '98, GDB was 
strictly case sensative.  It's now kind of both:

- does a case sensative compare (typically already lowercase against 
lowercase, so pretty imune to i18n)
- does a tolower compare

I think there is sufficient case sensatitivity left in GDB for the 
common user (me? :-) to just assume it is so.

Looking at charsets, it has a lowercase table ("iso-8859-1") where as 
the system (and ISO) specify upper case names 
(GDB_DEFAULT_TARGET_CHARSET "ISO-8859-1") causing the failure.

> It seems to me that:
> - cli-decode.c should use safe-charset.h,
> - the enum code in cli-setshow.c should be changed to be
>   case-insensitive, using safe-charset.h, and

I think that would be ill advised.  GDB relies on case sensativity vis:

	(gdb) set remote P-packet off

While at present there isn't an equivalent ``p-packet'' command, there 
will be.  Having ``set remote p-packet'' one day map to ``P-packet'' and 
then, the next, map to ``p-packet'' would be confusing.

> - charset.c should be changed to use an enum, for completion's sake.

Wonder if there is a way of automatically testing <tab> on new commands.

Andrew


      parent reply	other threads:[~2003-04-24 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22 19:59 Elena Zannoni
2003-04-23  9:45 ` Eli Zaretskii
2003-04-23 17:00   ` H. J. Lu
2003-04-23 19:45   ` Andrew Cagney
2003-04-24  2:35     ` Jim Blandy
2003-04-24 20:07       ` Elena Zannoni
2003-04-24 20:26       ` Andrew Cagney [this message]

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=3EA84866.9040702@redhat.com \
    --to=ac131313@redhat.com \
    --cc=eliz@elta.co.il \
    --cc=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).