[PATCH 4/6] gdb/continuations: do minor cleanup

Tankut Baris Aktemur tankut.baris.aktemur@intel.com
Wed Apr 21 12:57:29 GMT 2021


Inferior continuations are no longer used by the until and finish
command.  It is used only by the attach command and the remote target
upon detecting new inferiors.  Update the comment accordingly.

Also update another comment about non-existent thread continuations and
remove an unused #include.

gdb/ChangeLog:
2021-04-21  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* continuations.h: Update the general comment.
	* inferior.h (class inferior) <continuations>: Update the comment.
	* interps.c: Do not include "continuations.h".
---
 gdb/continuations.h | 4 ++--
 gdb/inferior.h      | 3 +--
 gdb/interps.c       | 1 -
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/gdb/continuations.h b/gdb/continuations.h
index 7ebe82af1c5..39130c65f0f 100644
--- a/gdb/continuations.h
+++ b/gdb/continuations.h
@@ -25,8 +25,8 @@ struct inferior;
 /* To continue the execution commands when running gdb asynchronously.
    A continuation structure contains a pointer to a function to be called
    to finish the command, once the target has stopped.  Such mechanism is
-   used by the finish and until commands, and in the remote protocol
-   when opening an extended-remote connection.  */
+   used by the attach command and the remote target when a new inferior
+   is detected.  */
 
 /* Prototype of the continuation callback functions.  ARG is the
    continuation argument registered in the corresponding
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 66fc180ce53..9ca510e4e6e 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -509,8 +509,7 @@ class inferior : public refcounted_object
   bool detaching = false;
 
   /* What is left to do for an execution command after any thread of
-     this inferior stops.  For continuations associated with a
-     specific thread, see `struct thread_info'.  */
+     this inferior stops.  */
   continuation *continuations = NULL;
 
   /* True if setup_inferior wasn't called for this inferior yet.
diff --git a/gdb/interps.c b/gdb/interps.c
index d15a36a4266..ec19822b571 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -37,7 +37,6 @@
 #include "interps.h"
 #include "completer.h"
 #include "top.h"		/* For command_loop.  */
-#include "continuations.h"
 #include "main.h"
 
 /* Each UI has its own independent set of interpreters.  */
-- 
2.17.1



More information about the Gdb-patches mailing list