]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use GNU style for metasyntactic variables in gdb
authorTom Tromey <tom@tromey.com>
Fri, 14 Sep 2018 13:45:06 +0000 (07:45 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 16 Sep 2018 12:25:17 +0000 (06:25 -0600)
I searched for other spots that did not use the GNU style for
metasyntactic syntactic variables.  This patch fixes most of the ones
I found in gdb proper.  There are a few remaining in MI, but I was
unsure whether those should be touched.

gdb/ChangeLog
2018-09-16  Tom Tromey  <tom@tromey.com>

* top.c (new_ui_command): Use GNU style for metasyntactic
variables.
* breakpoint.c (stopat_command): Use GNU style for metasyntactic
variables.
* maint.c (maintenance_translate_address): Remove "<>" around
text.
* interps.c (interpreter_exec_cmd): Use GNU style for
metasyntactic variables.
* nto-procfs.c (nto_procfs_target_info): Use GNU style for
metasyntactic variables.
* tracepoint.c (tfind_range_command): Use GNU style for
metasyntactic variables.
(tfind_outside_command): Likewise.
(_initialize_tracepoint): Likewise.
* remote.c (extended_remote_target::create_inferior): Use GNU
style for metasyntactic variables.
* sparc64-tdep.c (adi_examine_command): Use GNU style for
metasyntactic variables.
(adi_assign_command): Likewise.

gdb/testsuite/ChangeLog
2018-09-16  Tom Tromey  <tom@tromey.com>

* gdb.base/new-ui.exp (do_execution_tests): Update.
* gdb.base/dbx.exp (test_breakpoints): Update.

12 files changed:
gdb/ChangeLog
gdb/breakpoint.c
gdb/interps.c
gdb/maint.c
gdb/nto-procfs.c
gdb/remote.c
gdb/sparc64-tdep.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/dbx.exp
gdb/testsuite/gdb.base/new-ui.exp
gdb/top.c
gdb/tracepoint.c

index 095c6b5bf6472de94d498946219182ab1772f33e..0330cd9f6981a09fc1d7786ee626b8df843dc3ad 100644 (file)
@@ -1,3 +1,25 @@
+2018-09-16  Tom Tromey  <tom@tromey.com>
+
+       * top.c (new_ui_command): Use GNU style for metasyntactic
+       variables.
+       * breakpoint.c (stopat_command): Use GNU style for metasyntactic
+       variables.
+       * maint.c (maintenance_translate_address): Remove "<>" around
+       text.
+       * interps.c (interpreter_exec_cmd): Use GNU style for
+       metasyntactic variables.
+       * nto-procfs.c (nto_procfs_target_info): Use GNU style for
+       metasyntactic variables.
+       * tracepoint.c (tfind_range_command): Use GNU style for
+       metasyntactic variables.
+       (tfind_outside_command): Likewise.
+       (_initialize_tracepoint): Likewise.
+       * remote.c (extended_remote_target::create_inferior): Use GNU
+       style for metasyntactic variables.
+       * sparc64-tdep.c (adi_examine_command): Use GNU style for
+       metasyntactic variables.
+       (adi_assign_command): Likewise.
+
 2018-09-16  Tom Tromey  <tom@tromey.com>
 
        * disasm.c (show_disassembler_options_sfunc): Use GNU style for
index 4e7dac51574b1806aa925d6246135aa3a71ac173..85cb7d7afcd53a94c4b7fc020b1711d844cf6882 100644 (file)
@@ -9591,7 +9591,7 @@ stopat_command (const char *arg, int from_tty)
     }
 
   if (badInput)
-    printf_filtered (_("Usage: stop at <line>\n"));
+    printf_filtered (_("Usage: stop at LINE\n"));
   else
     break_command_1 (arg, 0, from_tty);
 }
index 789ae8694694ed1e9d5c610af32ea2b7f8da9aa3..6fe4c74e938616139d6c579fb1e2a3fdb16f1d38 100644 (file)
@@ -375,7 +375,7 @@ interpreter_exec_cmd (const char *args, int from_tty)
   nrules = prules.count ();
 
   if (nrules < 2)
-    error (_("usage: interpreter-exec <interpreter> [ <command> ... ]"));
+    error (_("Usage: interpreter-exec INTERPRETER [ COMMAND... ]"));
 
   old_interp = ui_interp->current_interpreter;
 
index 5d4701cfaccac14b6cce98ab1cb12f6328f2bf0f..19db8a850b3a8e1bd85584a2a06cac13c377923e 100644 (file)
@@ -444,7 +444,7 @@ maintenance_translate_address (const char *arg, int from_tty)
       while (*p && !isspace (*p))      /* Find end of section name.  */
        p++;
       if (*p == '\000')                /* End of command?  */
-       error (_("Need to specify <section-name> and <address>"));
+       error (_("Need to specify section name and address"));
 
       int arg_len = p - arg;
       p = skip_spaces (p + 1);
index 54357af85b2e1112c4151f93731e4d8651289d4d..ed2ef37471dd637e733b154f74a0fc2c424fc8c0 100644 (file)
@@ -143,7 +143,7 @@ class nto_procfs_target_native final : public nto_procfs_target
 static const target_info nto_procfs_target_info = {
   "procfs",
   N_("QNX Neutrino local or remote process"),
-  N_("QNX Neutrino process.  target procfs <node>")
+  N_("QNX Neutrino process.  target procfs NODE")
 };
 
 struct nto_procfs_target_procfs final : public nto_procfs_target
index 3b19da75eaff406632635800f9cf52f985332c41..39b3823ffc4ff4ebd0dd27c1fd829ef18f3d35f7 100644 (file)
@@ -10158,7 +10158,7 @@ Remote replied unexpectedly while setting startup-with-shell: %s"),
       if (remote_exec_file[0])
        error (_("Remote target does not support \"set remote exec-file\""));
       if (!args.empty ())
-       error (_("Remote target does not support \"set args\" or run <ARGS>"));
+       error (_("Remote target does not support \"set args\" or run ARGS"));
 
       /* Fall back to "R".  */
       extended_remote_restart ();
index f25f554f753566b9c1dbcdc6dccafc5706542f08..b1ee6c1b57d079d005cb65da2f1e607009fc25b4 100644 (file)
@@ -449,7 +449,7 @@ do_assign (CORE_ADDR start, size_t bcnt, int version)
 
    Command syntax:
 
-     adi (examine|x)/count <addr> */
+     adi (examine|x)[/COUNT] [ADDR] */
 
 static void
 adi_examine_command (const char *args, int from_tty)
@@ -473,7 +473,7 @@ adi_examine_command (const char *args, int from_tty)
   if (p != 0 && *p != 0)
     next_address = parse_and_eval_address (p);
   if (!cnt || !next_address)
-    error (_("Usage: adi examine|x[/count] <addr>"));
+    error (_("Usage: adi examine|x[/COUNT] [ADDR]"));
 
   do_examine (next_address, cnt);
 }
@@ -482,11 +482,14 @@ adi_examine_command (const char *args, int from_tty)
 
    Command syntax:
 
-     adi (assign|a)/count <addr> = <version>  */
+     adi (assign|a)[/COUNT] ADDR = VERSION  */
 
 static void
 adi_assign_command (const char *args, int from_tty)
 {
+  static const char *adi_usage
+    = N_("Usage: adi assign|a[/COUNT] ADDR = VERSION");
+
   /* make sure program is active and adi is available */
   if (!target_has_execution)
     error (_("ADI command requires a live process/thread"));
@@ -496,13 +499,13 @@ adi_assign_command (const char *args, int from_tty)
 
   const char *exp = args;
   if (exp == 0)
-    error_no_arg (_("Usage: adi assign|a[/count] <addr> = <version>"));
+    error_no_arg (_(adi_usage));
 
   char *q = (char *) strchr (exp, '=');
   if (q)
     *q++ = 0;
   else
-    error (_("Usage: adi assign|a[/count] <addr> = <version>"));
+    error ("%s", _(adi_usage));
 
   size_t cnt = 1;
   const char *p = args;
@@ -516,7 +519,7 @@ adi_assign_command (const char *args, int from_tty)
   if (p != 0 && *p != 0)
     next_address = parse_and_eval_address (p);
   else
-    error (_("Usage: adi assign|a[/count] <addr> = <version>"));
+    error ("%s", _(adi_usage));
 
   int version = 0;
   if (q != NULL)           /* parse version tag */
index 8adafd6bfab6b6a9084d4b6e3a2ee4eb55c7d73c..02aeb04a5d133ab22ede1d4e1ba7f765c9a805d9 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-16  Tom Tromey  <tom@tromey.com>
+
+       * gdb.base/new-ui.exp (do_execution_tests): Update.
+       * gdb.base/dbx.exp (test_breakpoints): Update.
+
 2018-09-14  Alan Hayward  <alan.hayward@arm.com>
 
        * lib/gdb.exp (gdb_simple_compile): Add proc.
index 40e02380cb95a8df85c19be7c51be1971555075c..688fcbed1338fab9fa74b48e8f3aed4a10444151 100644 (file)
@@ -234,7 +234,7 @@ proc test_breakpoints { } {
     set stop_line [gdb_get_line_number "stop-at-call"]
     gdb_test "stop at average.c:$stop_line" "Breakpoint.*at.*: file.*average\.c, line $stop_line.*"
     gdb_test "stop in average.c:$stop_line" "Usage: stop in <function . address>"
-    gdb_test "stop at main" "Usage: stop at <line>"
+    gdb_test "stop at main" "Usage: stop at LINE"
 }
 
 #
index ec15e221a171483f0b758eb36b9e043992f97bad..36b7ff25df9d44196ab474142087642d1e3a10a0 100644 (file)
@@ -87,7 +87,7 @@ proc_with_prefix do_test {} {
     }
 
     gdb_test "new-ui" \
-       "usage: new-ui <interpreter> <tty>" \
+       "Usage: new-ui INTERPRETER TTY" \
        "new-ui without arguments"
 
     set test "new-ui does not repeat"
index 470276e3106c4cb1626efcf1173f126f1f8d3fb3..0a4d36cbea4db0a52dda8cf440be56a21db1d204 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -338,7 +338,7 @@ new_ui_command (const char *args, int from_tty)
   argc = argv.count ();
 
   if (argc < 2)
-    error (_("usage: new-ui <interpreter> <tty>"));
+    error (_("Usage: new-ui INTERPRETER TTY"));
 
   interpreter_name = argv[0];
   tty_name = argv[1];
index a96f56a06b5de387d43426ab3ff4e58b832b9032..bb5a8507739f8c9481b94bd22bdfae3a04fe6c76 100644 (file)
@@ -2427,7 +2427,7 @@ tfind_range_command (const char *args, int from_tty)
 
   if (args == 0 || *args == 0)
     { /* XXX FIXME: what should default behavior be?  */
-      printf_filtered ("Usage: tfind range <startaddr>,<endaddr>\n");
+      printf_filtered ("Usage: tfind range STARTADDR, ENDADDR\n");
       return;
     }
 
@@ -2461,7 +2461,7 @@ tfind_outside_command (const char *args, int from_tty)
 
   if (args == 0 || *args == 0)
     { /* XXX FIXME: what should default behavior be?  */
-      printf_filtered ("Usage: tfind outside <startaddr>,<endaddr>\n");
+      printf_filtered ("Usage: tfind outside STARTADDR, ENDADDR\n");
       return;
     }
 
@@ -4031,12 +4031,12 @@ No argument means forward by one frame; '-' means backward by one frame."),
 
   add_cmd ("outside", class_trace, tfind_outside_command, _("\
 Select a trace frame whose PC is outside the given range (exclusive).\n\
-Usage: tfind outside addr1, addr2"),
+Usage: tfind outside ADDR1, ADDR2"),
           &tfindlist);
 
   add_cmd ("range", class_trace, tfind_range_command, _("\
 Select a trace frame whose PC is in the given range (inclusive).\n\
-Usage: tfind range addr1,addr2"),
+Usage: tfind range ADDR1, ADDR2"),
           &tfindlist);
 
   add_cmd ("line", class_trace, tfind_line_command, _("\