2008-10-27 Pedro Alves * inflow.c (kill_command): If the target claims there is still execution, don't clear the thread list. --- gdb/inflow.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) Index: src/gdb/inflow.c =================================================================== --- src.orig/gdb/inflow.c 2008-10-27 20:38:52.000000000 +0000 +++ src/gdb/inflow.c 2008-10-27 22:31:15.000000000 +0000 @@ -601,14 +601,19 @@ kill_command (char *arg, int from_tty) error (_("Not confirmed.")); target_kill (); - init_thread_list (); /* Destroy thread info */ - - /* Killing off the inferior can leave us with a core file. If so, - print the state we are left in. */ - if (target_has_stack) - { - printf_filtered (_("In %s,\n"), target_longname); - print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC); + /* If the current target interface claims there's still execution, + then don't mess with threads of other processes. */ + if (!target_has_execution) + { + init_thread_list (); /* Destroy thread info */ + + /* Killing off the inferior can leave us with a core file. If + so, print the state we are left in. */ + if (target_has_stack) + { + printf_filtered (_("In %s,\n"), target_longname); + print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC); + } } bfd_cache_close_all (); }