Index: gdb/gdbserver/inferiors.c |
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c |
index 76abaf5353ee57747f72fa9f99f93b42c2d5138a..5f974ca3f9950ac4d9e2e12e5125fcd2b8e21cbd 100644 |
--- a/gdb/gdbserver/inferiors.c |
+++ b/gdb/gdbserver/inferiors.c |
@@ -1,5 +1,5 @@ |
/* Inferior process information for the remote server for GDB. |
- Copyright (C) 2002, 2005, 2007-2012 Free Software Foundation, Inc. |
+ Copyright (C) 2002-2013 Free Software Foundation, Inc. |
Contributed by MontaVista Software. |
@@ -22,6 +22,7 @@ |
#include "server.h" |
#include "gdbthread.h" |
+#include "dll.h" |
struct inferior_list all_processes; |
struct inferior_list all_threads; |
@@ -102,7 +103,6 @@ add_thread (ptid_t thread_id, void *target_data) |
current_inferior = new_thread; |
new_thread->target_data = target_data; |
- set_inferior_regcache_data (new_thread, new_register_cache ()); |
} |
ptid_t |
@@ -161,6 +161,9 @@ free_one_thread (struct inferior_list_entry *inf) |
void |
remove_thread (struct thread_info *thread) |
{ |
+ if (thread->btrace != NULL) |
+ target_disable_btrace (thread->btrace); |
+ |
remove_inferior (&all_threads, (struct inferior_list_entry *) thread); |
free_one_thread (&thread->entry); |
} |