/* 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.
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;
inferior->target_data = data;
}
-void *
+struct regcache *
inferior_regcache_data (struct thread_info *inferior)
{
return inferior->regcache_data;
}
void
-set_inferior_regcache_data (struct thread_info *inferior, void *data)
+set_inferior_regcache_data (struct thread_info *inferior, struct regcache *data)
{
inferior->regcache_data = 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);
}