From: Yao Qi <yao@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] partial fix PR 14777: Add abbrev cmd 'fo' for 'forward-search'.
Date: Thu, 08 Nov 2012 09:39:00 -0000 [thread overview]
Message-ID: <509B7DA5.3040009@codesourcery.com> (raw)
In-Reply-To: <20121107151342.GG5103@adacore.com>
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 <yao@codesourcery.com>
* 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
next prev parent reply other threads:[~2012-11-08 9:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 13:01 Yao Qi
2012-11-07 15:13 ` Joel Brobecker
2012-11-07 16:07 ` Pedro Alves
2012-11-08 9:39 ` Yao Qi [this message]
2012-11-08 16:11 ` Pedro Alves
2012-11-28 10:10 ` Yao Qi
2012-11-28 10:18 ` Pedro Alves
2012-11-28 10:36 ` Yao Qi
2012-11-28 11:10 ` Pedro Alves
2012-11-28 11:57 ` [committed]: " Yao Qi
2012-11-07 16:10 ` Eli Zaretskii
2012-11-09 8:35 ` Yao Qi
2012-11-09 8:43 ` Eli Zaretskii
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=509B7DA5.3040009@codesourcery.com \
--to=yao@codesourcery.com \
--cc=brobecker@adacore.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