{
switch (disposition)
{
- case INVALIDATE_CONTEXT:
- if (ptid.lwp () != current_event.dwThreadId)
- th->suspend ();
- invalidate_thread_context (th);
- break;
case DONT_SUSPEND:
th->suspended = -1;
invalidate_thread_context (th);
void
windows_nat_target::fetch_registers (struct regcache *regcache, int r)
{
- windows_thread_info *th
- = windows_process->thread_rec (regcache->ptid (), INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process->find_thread (regcache->ptid ());
/* Check if TH exists. Windows sometimes uses a non-existent
thread id in its events. */
void
windows_nat_target::store_registers (struct regcache *regcache, int r)
{
- windows_thread_info *th
- = windows_process->thread_rec (regcache->ptid (), INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process->find_thread (regcache->ptid ());
/* Check if TH exists. Windows sometimes uses a non-existent
thread id in its events. */
*ourstatus = stop->status;
ptid_t ptid (windows_process->current_event.dwProcessId, thread_id);
- windows_process->thread_rec (ptid, INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process->find_thread (ptid);
+ if (th != nullptr)
+ windows_process->invalidate_thread_context (th);
return ptid;
}
&& windows_process->windows_initialization_done)
{
ptid_t ptid = ptid_t (current_event->dwProcessId, thread_id, 0);
- windows_thread_info *th
- = windows_process->thread_rec (ptid, INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process->find_thread (ptid);
th->stopped_at_software_breakpoint = true;
th->pc_adjusted = false;
}
if (ourstatus->kind () != TARGET_WAITKIND_EXITED
&& ourstatus->kind () != TARGET_WAITKIND_SIGNALLED)
{
- windows_thread_info *th
- = windows_process->thread_rec (result, INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process->find_thread (result);
if (th != nullptr)
{
child_fetch_inferior_registers (struct regcache *regcache, int r)
{
int regno;
- windows_thread_info *th
- = windows_process.thread_rec (current_thread->id,
- INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process.find_thread (current_thread->id);
+ win32_require_context (th);
if (r == -1 || r > NUM_REGS)
child_fetch_inferior_registers (regcache, NUM_REGS);
else
child_store_inferior_registers (struct regcache *regcache, int r)
{
int regno;
- windows_thread_info *th
- = windows_process.thread_rec (current_thread->id,
- INVALIDATE_CONTEXT);
+ windows_thread_info *th = windows_process.find_thread (current_thread->id);
+ win32_require_context (th);
if (r == -1 || r == 0 || r > NUM_REGS)
child_store_inferior_registers (regcache, NUM_REGS);
else