[binutils-gdb] Use upper case for more metasyntactic variables in gdb

Tom Tromey tromey@sourceware.org
Fri Jan 4 21:45:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48c5e7e239fba27bea134f6cd5f414300b7cd3ac

commit 48c5e7e239fba27bea134f6cd5f414300b7cd3ac
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Dec 24 14:41:40 2018 -0700

    Use upper case for more metasyntactic variables in gdb
    
    I noticed a few places where a Usage line in gdb did not use upper
    case for metasyntactic variables.  This patch fixes all the instances
    I found.
    
    Tested on x86-64 Fedora 28.
    
    gdb/ChangeLog
    2019-01-04  Tom Tromey  <tom@tromey.com>
    
    	* compile/compile.c (_initialize_compile): Use upper case for
    	metasyntactic variables.
    	* symmisc.c (_initialize_symmisc): Use upper case for
    	metasyntactic variables.
    	* psymtab.c (_initialize_psymtab): Use upper case for
    	metasyntactic variables.
    	* demangle.c (demangle_command): Use upper case for metasyntactic
    	variables.
    	(_initialize_demangler): Likewise.
    	* ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
    	variables.

Diff:
---
 gdb/ChangeLog         | 14 ++++++++++++++
 gdb/ax-gdb.c          |  4 ++--
 gdb/compile/compile.c |  2 +-
 gdb/demangle.c        |  4 ++--
 gdb/psymtab.c         |  4 ++--
 gdb/symmisc.c         |  6 +++---
 6 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 305eb7a..12305ef 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,17 @@
+2019-01-04  Tom Tromey  <tom@tromey.com>
+
+	* compile/compile.c (_initialize_compile): Use upper case for
+	metasyntactic variables.
+	* symmisc.c (_initialize_symmisc): Use upper case for
+	metasyntactic variables.
+	* psymtab.c (_initialize_psymtab): Use upper case for
+	metasyntactic variables.
+	* demangle.c (demangle_command): Use upper case for metasyntactic
+	variables.
+	(_initialize_demangler): Likewise.
+	* ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
+	variables.
+
 2019-01-03  Tom Tromey  <tom@tromey.com>
 
 	* tui/tui-source.c (tui_set_source_content): Use xstrdup.
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index eacec74..88e9b43 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -2751,7 +2751,7 @@ _initialize_ax_gdb (void)
   add_cmd ("agent", class_maintenance, agent_command,
 	   _("\
 Translate an expression into remote agent bytecode for tracing.\n\
-Usage: maint agent [-at location,] EXPRESSION\n\
+Usage: maint agent [-at LOCATION,] EXPRESSION\n\
 If -at is given, generate remote agent bytecode for this location.\n\
 If not, generate remote agent bytecode for current frame pc address."),
 	   &maintenancelist);
@@ -2759,7 +2759,7 @@ If not, generate remote agent bytecode for current frame pc address."),
   add_cmd ("agent-eval", class_maintenance, agent_eval_command,
 	   _("\
 Translate an expression into remote agent bytecode for evaluation.\n\
-Usage: maint agent-eval [-at location,] EXPRESSION\n\
+Usage: maint agent-eval [-at LOCATION,] EXPRESSION\n\
 If -at is given, generate remote agent bytecode for this location.\n\
 If not, generate remote agent bytecode for current frame pc address."),
 	   &maintenancelist);
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 7ab546c..b11df7d 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -941,7 +941,7 @@ indicate the end of the expression."),
 	       _("\
 Evaluate a file containing source code.\n\
 \n\
-Usage: compile file [-r|-raw] [filename]\n\
+Usage: compile file [-r|-raw] [FILENAME]\n\
 -r|-raw: Suppress automatic 'void _gdb_expr () { CODE }' wrapping."),
 	       &compile_command_list);
   set_cmd_completer (c, filename_completer);
diff --git a/gdb/demangle.c b/gdb/demangle.c
index a637214..29f4696 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -188,7 +188,7 @@ demangle_command (const char *args, int from_tty)
   name = arg_start;
 
   if (*name == '\0')
-    error (_("Usage: demangle [-l language] [--] name"));
+    error (_("Usage: demangle [-l LANGUAGE] [--] NAME"));
 
   if (!lang_name.empty ())
     {
@@ -262,7 +262,7 @@ Use `set demangle-style' without arguments for a list of demangling styles."),
 
   add_cmd ("demangle", class_support, demangle_command, _("\
 Demangle a mangled name.\n\
-Usage: demangle [-l language] [--] name\n\
+Usage: demangle [-l LANGUAGE] [--] NAME\n\
 If LANGUAGE is not specified, NAME is demangled in the current language."),
 	   &cmdlist);
 }
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 950b6fd..f14aae6 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -2236,8 +2236,8 @@ _initialize_psymtab (void)
 {
   add_cmd ("psymbols", class_maintenance, maintenance_print_psymbols, _("\
 Print dump of current partial symbol definitions.\n\
-Usage: mt print psymbols [-objfile objfile] [-pc address] [--] [outfile]\n\
-       mt print psymbols [-objfile objfile] [-source source] [--] [outfile]\n\
+Usage: mt print psymbols [-objfile OBJFILE] [-pc ADDRESS] [--] [OUTFILE]\n\
+       mt print psymbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\
 Entries in the partial symbol table are dumped to file OUTFILE,\n\
 or the terminal if OUTFILE is unspecified.\n\
 If ADDRESS is provided, dump only the file for that address.\n\
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 3e67926..46c8206 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -1072,8 +1072,8 @@ _initialize_symmisc (void)
 
   add_cmd ("symbols", class_maintenance, maintenance_print_symbols, _("\
 Print dump of current symbol definitions.\n\
-Usage: mt print symbols [-pc address] [--] [outfile]\n\
-       mt print symbols [-objfile objfile] [-source source] [--] [outfile]\n\
+Usage: mt print symbols [-pc ADDRESS] [--] [OUTFILE]\n\
+       mt print symbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\
 Entries in the full symbol table are dumped to file OUTFILE,\n\
 or the terminal if OUTFILE is unspecified.\n\
 If ADDRESS is provided, dump only the file for that address.\n\
@@ -1083,7 +1083,7 @@ If OBJFILE is provided, dump only that file's minimal symbols."),
 
   add_cmd ("msymbols", class_maintenance, maintenance_print_msymbols, _("\
 Print dump of current minimal symbol definitions.\n\
-Usage: mt print msymbols [-objfile objfile] [--] [outfile]\n\
+Usage: mt print msymbols [-objfile OBJFILE] [--] [OUTFILE]\n\
 Entries in the minimal symbol table are dumped to file OUTFILE,\n\
 or the terminal if OUTFILE is unspecified.\n\
 If OBJFILE is provided, dump only that file's minimal symbols."),



More information about the Gdb-cvs mailing list