This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] More suggestive error_is_running message


Hi,

I was debugging some testsuite race before I figured out in non-stop mode one
has to wait first for
	[Thread N] #1 stopped.
before executing any commands otherwise one gets:
	Cannot execute this command while the selected thread is running.

Not sure if this error message would help me or not but I found it tricky.

No regressions on {x86_64,x86_64-m32,i686}-fedora17-linux-gnu.
I am not going to check it in on my own.


Thanks,
Jan


gdb/
2012-04-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Provide more specific error_is_running error message.
	* infrun.c (error_is_running): Extend the error message text.

--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3038,7 +3045,9 @@ void
 error_is_running (void)
 {
   error (_("Cannot execute this command while "
-	   "the selected thread is running."));
+	   "the selected thread is running.  "
+	   "(You may want to use 'interrupt' "
+	   "and wait for '[Thread N] #1 stopped.'.)"));
 }
 
 void


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]