7770293 Introduce switch_to_inferior_no_thread

Authored and Committed by palves 4 years ago
    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:
    yyyy-mm-dd  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.
    
        
file modified
+13 -8
file modified
+4 -0
file modified
+1 -5