Use upper case for more metasyntactic variables in gdb

Message ID 20181224214225.14262-1-tom@tromey.com
State New
Headers show
Series
  • Use upper case for more metasyntactic variables in gdb
Related show

Commit Message

Tom Tromey Dec. 24, 2018, 9:42 p.m.
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
2018-12-24  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.
---
 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(-)

-- 
2.17.2

Comments

Simon Marchi Jan. 4, 2019, 3:45 a.m. | #1
On 2018-12-24 16:42, Tom Tromey wrote:
> 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.


Thanks, this LGTM.

Simon

Patch

diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index ef053f75c6..d048ba4407 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 f6f49e0833..7c07a0ed71 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 8b341ee67b..c0bd57e8bc 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 6d76e8d489..7539de3278 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 d30a35481e..2f5005b63c 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."),