From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16194 invoked by alias); 15 Nov 2005 14:12:42 -0000 Received: (qmail 16170 invoked by uid 22791); 15 Nov 2005 14:12:38 -0000 Received: from lon-del-03.spheriq.net (HELO lon-del-03.spheriq.net) (195.46.50.99) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 15 Nov 2005 14:12:38 +0000 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-03.spheriq.net with ESMTP id jAFECZ66030314 for ; Tue, 15 Nov 2005 14:12:35 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-01.spheriq.net with ESMTP id jAFECYGA031745 for ; Tue, 15 Nov 2005 14:12:34 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id jAFECVhk007224 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 15 Nov 2005 14:12:33 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 799C8DA8A for ; Tue, 15 Nov 2005 14:11:47 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id C09A0473DF; Tue, 15 Nov 2005 14:14:45 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 73A0D75994 for ; Tue, 15 Nov 2005 14:14:45 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D4FF147411 for ; Tue, 15 Nov 2005 14:14:44 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CGZ28182 (AUTH "andrew stubbs"); Tue, 15 Nov 2005 14:11:45 GMT Message-ID: <4379EC0A.3060601@st.com> Date: Tue, 15 Nov 2005 18:11:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [PATCH] Fix 'Undefined command' error message Content-Type: multipart/mixed; boundary="------------000801050104010307020305" X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.1.07 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00206.txt.bz2 This is a multi-part message in MIME format. --------------000801050104010307020305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 333 Hi, The following demonstrates the problem: (gdb) abc_def Undefined command: "abc". Try "help". Non-alphanumeric characters, such as underscore, are permitted in command names (including user defined commands), but are not understood when giving error messages. The attached patch fixes the problem. OK? Andrew Stubbs --------------000801050104010307020305 Content-Type: text/plain; name="cli-decode.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cli-decode.patch" Content-length: 844 2005-11-15 Andrew Stubbs * cli-decode.c (lookup_cmd): Allow all the same characters in command names that lookup_cmd_composition() does. Index: src/gdb/cli/cli-decode.c =================================================================== --- src.orig/gdb/cli/cli-decode.c 2005-05-26 21:49:02.000000000 +0100 +++ src/gdb/cli/cli-decode.c 2005-11-09 11:39:52.000000000 +0000 @@ -1196,7 +1196,12 @@ lookup_cmd (char **line, struct cmd_list { char *p = *line, *q; - while (isalnum (*p) || *p == '-') + while (*p && (isalnum (*p) || *p == '-' || *p == '_' || +#if defined(TUI) + (tui_active && + (*p == '+' || *p == '<' || *p == '>' || *p == '$')) || +#endif + (xdb_commands && (*p == '!' || *p == '/' || *p == '?')))) p++; q = (char *) alloca (p - *line + 1); --------------000801050104010307020305--