aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r--gdb/progspace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index b111a50..48cb34a 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -459,8 +459,7 @@ save_current_space_and_thread (void)
return old_chain;
}
-/* Switches full context to program space PSPACE. Switches to the
- first thread found bound to PSPACE. */
+/* See progspace.h */
void
switch_to_program_space_and_thread (struct program_space *pspace)
@@ -468,7 +467,7 @@ switch_to_program_space_and_thread (struct program_space *pspace)
struct inferior *inf;
inf = find_inferior_for_program_space (pspace);
- if (inf != NULL)
+ if (inf != NULL && inf->pid != 0)
{
struct thread_info *tp;