]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/reverse: update error message for "reverse-" commands
authorGuinevere Larsen <guinevere@redhat.com>
Thu, 23 Oct 2025 18:05:33 +0000 (15:05 -0300)
committerGuinevere Larsen <guinevere@redhat.com>
Fri, 24 Oct 2025 18:44:31 +0000 (15:44 -0300)
Before this change, when a user tried to use a command that executes the
inferior in reverse, they would get the following error message:
    Target multi-thread does not support this command.

As an end-user with no knowledge of the internals of GDB would have as a
best guess, that reverse execution as a whole would not be supported in
their system (verified by asking a couple new users).

This commit changes the message to avoid the internal terminology, and
to add a hint that the user may need to create a recording somehow to be
able to execute in reverse.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/reverse.c

index bda23ed21996c86f9030d930f20fce62af316980..0d67afad45e59c56cd5b0879f8627a08e4b65abe 100644 (file)
@@ -44,7 +44,8 @@ exec_reverse_once (const char *cmd, const char *args, int from_tty)
           cmd);
 
   if (!target_can_execute_reverse ())
-    error (_("Target %s does not support this command."), target_shortname ());
+    error (_("Reverse execution is not currently supported.\n"
+            "You may need to record the execution first."));
 
   std::string reverse_command = string_printf ("%s %s", cmd, args ? args : "");
   scoped_restore restore_exec_dir