From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5441 invoked by alias); 24 Apr 2003 02:35:46 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5434 invoked from network); 24 Apr 2003 02:35:44 -0000 Received: from unknown (HELO zenia.red-bean.com) (12.222.151.100) by sources.redhat.com with SMTP; 24 Apr 2003 02:35:44 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h3O2cuFq008451; Wed, 23 Apr 2003 21:38:56 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h3O2csaj008447; Wed, 23 Apr 2003 21:38:54 -0500 To: Andrew Cagney Cc: Eli Zaretskii , ezannoni@redhat.com, gdb@sources.redhat.com Subject: Re: charset.c problem with non-en_US locales References: <16037.41011.517603.566953@localhost.redhat.com> <7826-Wed23Apr2003124156+0300-eliz@elta.co.il> <3EA6ED61.1000900@redhat.com> From: Jim Blandy Date: Thu, 24 Apr 2003 02:35:00 -0000 In-Reply-To: <3EA6ED61.1000900@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.95 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00281.txt.bz2 Andrew Cagney writes: > Hmm, > > (gdb) set charset > > 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) I would assume that the following code in cli-decode.c:lookup_cmd_1 would have the same problems as the charset stuff in a Turkish locale: /* ** We didn't find the command in the entered case, so lower case it ** and search again. */ if (!found || nfound == 0) { for (tmp = 0; tmp < len; tmp++) { char x = command[tmp]; command[tmp] = isupper (x) ? tolower (x) : x; } found = find_cmd (command, len, clist, ignore_help_classes, &nfound); } 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 - charset.c should be changed to use an enum, for completion's sake.