From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21683 invoked by alias); 8 Nov 2012 09:39:07 -0000 Received: (qmail 21674 invoked by uid 22791); 8 Nov 2012 09:39:06 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Nov 2012 09:39:02 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TWOZg-00018i-Na from Yao_Qi@mentor.com ; Thu, 08 Nov 2012 01:39:00 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 8 Nov 2012 01:39:00 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Thu, 8 Nov 2012 01:39:00 -0800 Message-ID: <509B7DA5.3040009@codesourcery.com> Date: Thu, 08 Nov 2012 09:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: Subject: Re: [PATCH] partial fix PR 14777: Add abbrev cmd 'fo' for 'forward-search'. References: <1352293267-6640-1-git-send-email-yao@codesourcery.com> <20121107151342.GG5103@adacore.com> In-Reply-To: <20121107151342.GG5103@adacore.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00183.txt.bz2 On 11/07/2012 11:13 PM, Joel Brobecker wrote: > I should also add that we should make sure that we do not approve > updates to the manual that document command abbreviations without > specifically defining the abbreviation in our code. As demonstrated > in this case, implicit abbreviations may become ambiguous over time. Agreed. I go through the doc today, and spot another three abbreviated command missing abbreviation definition in code. @item show convenience Print a list of convenience variables used so far, and their values, as well as a list of the convenience functions. Abbreviated @code{show conv}. ^^^^^^^^^^^^^^^^ because @value{GDBN} has the command @code{set gnutarget}, abbreviated @code{set g}: ^^^^^^^^^^^^ @noindent You can abbreviate this command as @code{del tr}. ^^^^^^^^^^^^^^ patch below is to fix them. -- Yao gdb: 2012-11-08 Yao Qi * breakpoint.c (_initialize_breakpoint) Call add_alias_cmd to abbreviate 'delete tracepoints' to 'delete tr'. * corefile.c (_initialize_core): Call add_alias_cmd to abbreviate 'set gnutarget' to 'set g'. * value.c (_initialize_values): Call add_alias_cmd to abbreviate 'show convenience' to 'show conv'. --- gdb/breakpoint.c | 1 + gdb/corefile.c | 1 + gdb/value.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c7eef24..e16212e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -16337,6 +16337,7 @@ Delete specified tracepoints.\n\ Arguments are tracepoint numbers, separated by spaces.\n\ No argument means delete all tracepoints."), &deletelist); + add_alias_cmd ("tr", "tracepoints", no_class, 1, &deletelist); c = add_cmd ("tracepoints", class_trace, disable_trace_command, _("\ Disable specified tracepoints.\n\ diff --git a/gdb/corefile.c b/gdb/corefile.c index a2ed24f..da6e102 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -456,6 +456,7 @@ Use `set gnutarget auto' to specify automatic detection."), set_gnutarget_command, show_gnutarget_string, &setlist, &showlist); + add_alias_cmd ("g", "gnutarget", class_files, 1, &setlist); if (getenv ("GNUTARGET")) set_gnutarget (getenv ("GNUTARGET")); diff --git a/gdb/value.c b/gdb/value.c index 3feb1ca..a3cee32 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3380,6 +3380,7 @@ A few convenience variables are given values automatically:\n\ Convenience functions are defined via the Python API." #endif ), &showlist); + add_alias_cmd ("conv", "convenience", no_class, 1, &showlist); add_cmd ("values", no_set_class, show_values, _("\ Elements of value history around item number IDX (or last ten)."), -- 1.7.7.6