diff options
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index 66401ab99bd..44f456001d5 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -367,12 +367,15 @@ find_inferior_pid (int pid) return NULL; } -/* Find an inferior bound to PSPACE. */ +/* See inferior.h. */ struct inferior * find_inferior_for_program_space (struct program_space *pspace) { - struct inferior *inf; + struct inferior *inf = current_inferior (); + + if (inf->pspace == pspace) + return inf; for (inf = inferior_list; inf != NULL; inf = inf->next) { |