+2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
+
+ * inferiors.h (inferior_target_data): Rename to ...
+ (thread_target_data): ... this.
+ (inferior_regcache_data): Rename to ...
+ (thread_regcache_data): ... this.
+ (set_inferior_regcache_data): Rename to ...
+ (set_thread_regcache_data): ... this.
+ * inferiors.c (inferior_target_data): Rename to ...
+ (thread_target_data): ... this.
+ (inferior_regcache_data): Rename to ...
+ (thread_regcache_data): ... this.
+ (set_inferior_regcache_data): Rename to ...
+ (set_thread_regcache_data): ... this.
+ (free_one_thread): Update.
+ * linux-low.h (get_thread_lwp): Update.
+ * regcache.c (get_thread_regcache): Update.
+ (regcache_invalidate_thread): Update.
+ (free_register_cache_thread): Update.
+ * win32-i386-low.c (update_debug_registers_callback): Update.
+ (win32_get_current_dr): Update.
+ * win32-low.c (thread_rec): Update.
+ (delete_thread_info): Update.
+ (continue_one_thread): Update.
+ (suspend_one_thread): Update.
+
2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
* inferiors.c (set_inferior_target_data): Remove.
free_one_thread (struct inferior_list_entry *inf)
{
struct thread_info *thread = get_thread (inf);
- free_register_cache (inferior_regcache_data (thread));
+ free_register_cache (thread_regcache_data (thread));
free (thread);
}
}
void *
-inferior_target_data (struct thread_info *inferior)
+thread_target_data (struct thread_info *thread)
{
- return inferior->target_data;
+ return thread->target_data;
}
struct regcache *
-inferior_regcache_data (struct thread_info *inferior)
+thread_regcache_data (struct thread_info *thread)
{
- return inferior->regcache_data;
+ return thread->regcache_data;
}
void
-set_inferior_regcache_data (struct thread_info *inferior, struct regcache *data)
+set_thread_regcache_data (struct thread_info *thread, struct regcache *data)
{
- inferior->regcache_data = data;
+ thread->regcache_data = data;
}
/* Return true if LIST has exactly one entry. */
void *),
void *arg);
-void *inferior_target_data (struct thread_info *);
-struct regcache *inferior_regcache_data (struct thread_info *);
-void set_inferior_regcache_data (struct thread_info *, struct regcache *);
+void *thread_target_data (struct thread_info *);
+struct regcache *thread_regcache_data (struct thread_info *);
+void set_thread_regcache_data (struct thread_info *, struct regcache *);
#endif /* INFERIORS_H */
extern struct linux_target_ops the_low_target;
-#define get_thread_lwp(thr) ((struct lwp_info *) (inferior_target_data (thr)))
+#define get_thread_lwp(thr) ((struct lwp_info *) (thread_target_data (thr)))
#define get_lwp_thread(lwp) ((lwp)->thread)
/* This struct is recorded in the target_data field of struct thread_info.
{
struct regcache *regcache;
- regcache = inferior_regcache_data (thread);
+ regcache = thread_regcache_data (thread);
/* Threads' regcaches are created lazily, because biarch targets add
the main thread/lwp before seeing it stop for the first time, and
gdb_assert (proc->tdesc != NULL);
regcache = new_register_cache (proc->tdesc);
- set_inferior_regcache_data (thread, regcache);
+ set_thread_regcache_data (thread, regcache);
}
if (fetch && regcache->registers_valid == 0)
{
struct regcache *regcache;
- regcache = inferior_regcache_data (thread);
+ regcache = thread_regcache_data (thread);
if (regcache == NULL)
return;
static void
free_register_cache_thread (struct thread_info *thread)
{
- struct regcache *regcache = inferior_regcache_data (thread);
+ struct regcache *regcache = thread_regcache_data (thread);
if (regcache != NULL)
{
regcache_invalidate_thread (thread);
free_register_cache (regcache);
- set_inferior_regcache_data (thread, NULL);
+ set_thread_regcache_data (thread, NULL);
}
}
void *pid_p)
{
struct thread_info *thr = (struct thread_info *) entry;
- win32_thread_info *th = (win32_thread_info *) inferior_target_data (thr);
+ win32_thread_info *th = (win32_thread_info *) thread_target_data (thr);
int pid = *(int *) pid_p;
/* Only update the threads of this process. */
win32_get_current_dr (int dr)
{
win32_thread_info *th
- = (win32_thread_info *) inferior_target_data (current_thread);
+ = (win32_thread_info *) thread_target_data (current_thread);
win32_require_context (th);
if (thread == NULL)
return NULL;
- th = (win32_thread_info *) inferior_target_data (thread);
+ th = (win32_thread_info *) thread_target_data (thread);
if (get_context)
win32_require_context (th);
return th;
delete_thread_info (struct inferior_list_entry *entry)
{
struct thread_info *thread = (struct thread_info *) entry;
- win32_thread_info *th = (win32_thread_info *) inferior_target_data (thread);
+ win32_thread_info *th = (win32_thread_info *) thread_target_data (thread);
remove_thread (thread);
CloseHandle (th->h);
{
struct thread_info *thread = (struct thread_info *) this_thread;
int thread_id = * (int *) id_ptr;
- win32_thread_info *th = (win32_thread_info *) inferior_target_data (thread);
+ win32_thread_info *th = (win32_thread_info *) thread_target_data (thread);
if (thread_id == -1 || thread_id == th->tid)
{
suspend_one_thread (struct inferior_list_entry *entry)
{
struct thread_info *thread = (struct thread_info *) entry;
- win32_thread_info *th = (win32_thread_info *) inferior_target_data (thread);
+ win32_thread_info *th = (win32_thread_info *) thread_target_data (thread);
if (!th->suspended)
{