aboutsummaryrefslogtreecommitdiff
path: root/gdb/inferior.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-01-10 20:05:47 +0000
committerPedro Alves <palves@redhat.com>2020-01-10 20:05:47 +0000
commitdb2d40f7d0b8477ca5ad9e305b8137a085434c97 (patch)
treebce10d93633a8fe79fa2e14e994f9b89799bf922 /gdb/inferior.h
parentbd420a2dfff64978feb1659d3b77c7601b98463f (diff)
downloadfsf-binutils-gdb-db2d40f7d0b8477ca5ad9e305b8137a085434c97.zip
fsf-binutils-gdb-db2d40f7d0b8477ca5ad9e305b8137a085434c97.tar.gz
fsf-binutils-gdb-db2d40f7d0b8477ca5ad9e305b8137a085434c97.tar.bz2
Introduce switch_to_inferior_no_thread
Several places want to switch context to an inferior and its pspace, while at the same time switch to "no thread selected". This commit adds a function that does that, and uses it in a few places. gdb/ChangeLog: 2020-01-10 Pedro Alves <palves@redhat.com> * inferior.c (switch_to_inferior_no_thread): New function, factored out from ... (inferior_command): ... here. * inferior.h (switch_to_inferior_no_thread): Declare. * mi/mi-main.c (run_one_inferior): Use switch_to_inferior_no_thread.
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r--gdb/inferior.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h
index fe94a01..a9baa52 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -308,6 +308,10 @@ extern inferior *current_inferior ();
extern void set_current_inferior (inferior *);
+/* Switch inferior (and program space) to INF, and switch to no thread
+ selected. */
+extern void switch_to_inferior_no_thread (inferior *inf);
+
/* GDB represents the state of each program execution with an object
called an inferior. An inferior typically corresponds to a process
but is more general and applies also to targets that do not have a