Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Fix "usage" errors for some MI varobj commands
Date: Thu, 31 Aug 2023 12:00:12 -0600	[thread overview]
Message-ID: <20230831180012.211663-1-tromey@adacore.com> (raw)

I noticed that the "usage" error for -var-set-frozen mentioned the
wrong command name.  Then I looked through the whole file and found a
couple other spots that didn't mention the command name at all.  This
patch fixes all of these.
---
 gdb/mi/mi-cmd-var.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 095790a36c4..8b4dd6d0c96 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -246,7 +246,7 @@ mi_cmd_var_set_visualizer (const char *command, const char *const *argv,
   struct varobj *var;
 
   if (argc != 2)
-    error (_("Usage: NAME VISUALIZER_FUNCTION."));
+    error (_("-var-set-visualizer: Usage: NAME VISUALIZER_FUNCTION."));
 
   var = varobj_get_handle (argv[0]);
 
@@ -263,7 +263,7 @@ mi_cmd_var_set_frozen (const char *command, const char *const *argv, int argc)
   bool frozen;
 
   if (argc != 2)
-    error (_("-var-set-format: Usage: NAME FROZEN_FLAG."));
+    error (_("-var-set-frozen: Usage: NAME FROZEN_FLAG."));
 
   var = varobj_get_handle (argv[0]);
 
@@ -442,7 +442,7 @@ mi_cmd_var_info_path_expression (const char *command, const char *const *argv,
   struct varobj *var;
 
   if (argc != 1)
-    error (_("Usage: NAME."));
+    error (_("-var-info-path-expression: Usage: NAME."));
 
   /* Get varobj handle, if a valid var obj name was specified.  */
   var = varobj_get_handle (argv[0]);
-- 
2.40.1


             reply	other threads:[~2023-08-31 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 18:00 Tom Tromey via Gdb-patches [this message]
2023-08-31 22:03 ` Kevin Buettner via Gdb-patches

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=20230831180012.211663-1-tromey@adacore.com \
    --to=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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