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]

[ob] Add missing ERROR_NO_INFERIOR check


MI's -exec-continue implementation is now calling continue_1 (*) directly,
instead of continue_command, but, the former, since it was originally
an internal helper of continue_command, didn't have the check in the subject.

(*) Do we now allow public function with _1 suffix?  I always viewed
foo_1 functions as internal helpers.

Old, correct:

 -exec-continue
 ^running
 (gdb)
 &"The program is not being run.\n"
 ^error,msg="The program is not being run."
 (gdb)

Current:

 -exec-continue
 *stopped
 ^error,msg="You can't do that without a process to debug."
 (gdb)

This patch restores the old error message.

Checked in as obvious.

-- 
Pedro Alves
2008-08-14  Pedro Alves  <pedro@codesourcery.com>

	* infcmd.c (continue_1): Add an ERROR_NO_INFERIOR call.

---
 gdb/infcmd.c |    2 ++
 1 file changed, 2 insertions(+)

Index: src/gdb/infcmd.c
===================================================================
--- src.orig/gdb/infcmd.c	2008-08-09 18:58:45.000000000 +0100
+++ src/gdb/infcmd.c	2008-08-14 02:30:41.000000000 +0100
@@ -614,6 +614,8 @@ proceed_thread_callback (struct thread_i
 void
 continue_1 (int all_threads)
 {
+  ERROR_NO_INFERIOR;
+
   if (non_stop && all_threads)
     {
       /* Don't error out if the current thread is running, because

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