memcpy (&siginfo_er, rec, sizeof siginfo_er);
- last_sig = GDB_SIGNAL_0;
-
switch (code)
{
case EXCEPTION_ACCESS_VIOLATION:
}
if (ourstatus->kind () == TARGET_WAITKIND_STOPPED)
- last_sig = ourstatus->sig ();
+ {
+ ptid_t ptid (current_event.dwProcessId, current_event.dwThreadId, 0);
+ windows_thread_info *th = find_thread (ptid);
+ th->last_sig = ourstatus->sig ();
+ }
return result;
thread. */
DEBUG_EVENT last_event {};
+ /* The last signal reported for this thread, extracted out of
+ last_event. */
+ enum gdb_signal last_sig = GDB_SIGNAL_0;
+
/* The context of the thread, including any manipulations. */
union
{
HANDLE handle = 0;
DWORD process_id = 0;
DWORD main_thread_id = 0;
- enum gdb_signal last_sig = GDB_SIGNAL_0;
/* Contents of $_siginfo */
EXCEPTION_RECORD siginfo_er {};
});
th->resume ();
+ th->last_sig = GDB_SIGNAL_0;
}
/* Resume thread specified by ID, or all artificially suspended
DEBUG_EXCEPT ("Cannot continue with signal %d here. "
"Not stopped for EXCEPTION_DEBUG_EVENT", sig);
}
- else if (sig == windows_process.last_sig)
+ else if (sig == th->last_sig)
continue_status = DBG_EXCEPTION_NOT_HANDLED;
else
#if 0
}
#endif
DEBUG_EXCEPT ("Can only continue with received signal %d.",
- windows_process.last_sig);
+ th->last_sig);
}
- windows_process.last_sig = GDB_SIGNAL_0;
-
windows_process.with_context (th, [&] (auto *context)
{
if (step)
}
}
- windows_process.last_sig = GDB_SIGNAL_0;
-
if ((options & TARGET_WNOHANG) != 0 && !m_debug_event_pending)
{
ourstatus->set_ignore ();
{
struct inferior *inf;
- windows_process.last_sig = GDB_SIGNAL_0;
windows_process.open_process_used = 0;
#ifdef __CYGWIN__
windows_process.cygwin_load_start = 0;
{
struct process_info *proc;
- windows_process.last_sig = GDB_SIGNAL_0;
windows_process.handle = proch;
windows_process.process_id = pid;
windows_process.main_thread_id = 0;
}
th->resume ();
+ th->last_sig = GDB_SIGNAL_0;
}
}
}
"Not stopped for EXCEPTION_DEBUG_EVENT.\n",
gdb_signal_to_string (sig)));
}
- else if (sig == windows_process.last_sig)
+ else if (sig == th->last_sig)
*continue_status = DBG_EXCEPTION_NOT_HANDLED;
else
OUTMSG (("Can only continue with received signal %s.\n",
- gdb_signal_to_string (windows_process.last_sig)));
+ gdb_signal_to_string (th->last_sig)));
}
win32_prepare_to_resume (th);
{
ptid_t ptid;
- windows_process.last_sig = GDB_SIGNAL_0;
ourstatus->set_spurious ();
*continue_status = DBG_CONTINUE;