/* Inferior process information for the remote server for GDB.
- Copyright (C) 2002-2014 Free Software Foundation, Inc.
+ Copyright (C) 2002-2015 Free Software Foundation, Inc.
Contributed by MontaVista Software.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <stdlib.h>
-
#include "server.h"
#include "gdbthread.h"
#include "dll.h"
struct inferior_list all_processes;
struct inferior_list all_threads;
-struct thread_info *current_inferior;
+struct thread_info *current_thread;
#define get_thread(inf) ((struct thread_info *)(inf))
add_inferior_to_list (&all_threads, &new_thread->entry);
- if (current_inferior == NULL)
- current_inferior = new_thread;
+ if (current_thread == NULL)
+ current_thread = new_thread;
new_thread->target_data = target_data;
clear_dlls ();
- current_inferior = NULL;
+ current_thread = NULL;
}
struct process_info *
struct process_info *
current_process (void)
{
- if (current_inferior == NULL)
- fatal ("Current inferior requested, but current_inferior is NULL\n");
-
- return get_thread_process (current_inferior);
+ gdb_assert (current_thread != NULL);
+ return get_thread_process (current_thread);
}