static void free_register_cache_thread (struct thread_info *thread) { struct regcache *regcache = inferior_regcache_data (thread); if (regcache != NULL) { regcache_invalidate_thread (thread); free_register_cache (regcache); set_inferior_regcache_data (thread, NULL); } }
static int regcache_invalidate_one (struct inferior_list_entry *entry, void *pid_p) { struct thread_info *thread = (struct thread_info *) entry; int pid = *(int *) pid_p; /* Only invalidate the regcaches of threads of this process. */ if (ptid_get_pid (entry->id) == pid) regcache_invalidate_thread (thread); return 0; }