}
static void
-windows_fetch_inferior_registers (struct regcache *regcache, int r)
+windows_fetch_inferior_registers (struct target_ops *ops,
+ struct regcache *regcache, int r)
{
current_thread = thread_rec (ptid_get_tid (inferior_ptid), TRUE);
/* Check if current_thread exists. Windows sometimes uses a non-existent
/* Store a new register value into the current thread context */
static void
-windows_store_inferior_registers (struct regcache *regcache, int r)
+windows_store_inferior_registers (struct target_ops *ops,
+ struct regcache *regcache, int r)
{
current_thread = thread_rec (ptid_get_tid (inferior_ptid), TRUE);
/* Check if current_thread exists. Windows sometimes uses a non-existent
}
static void
-windows_resume (ptid_t ptid, int step, enum target_signal sig)
+windows_resume (struct target_ops *ops,
+ ptid_t ptid, int step, enum target_signal sig)
{
thread_info *th;
DWORD continue_status = DBG_CONTINUE;
if (step)
{
/* Single step by setting t bit */
- windows_fetch_inferior_registers (get_current_regcache (),
- gdbarch_ps_regnum (current_gdbarch));
+ windows_fetch_inferior_registers (ops,
+ get_current_regcache (),
+ gdbarch_ps_regnum (current_gdbarch));
th->context.EFlags |= FLAG_TRACE_BIT;
}
handling by WFI (or whatever).
*/
static int
-get_windows_debug_event (int pid, struct target_waitstatus *ourstatus)
+get_windows_debug_event (struct target_ops *ops,
+ int pid, struct target_waitstatus *ourstatus)
{
BOOL debug_event;
DWORD continue_status, event_code;
to find a better solution to that problem. But in the meantime,
the current approach already greatly mitigate this issue. */
SetConsoleCtrlHandler (NULL, TRUE);
- retval = get_windows_debug_event (pid, ourstatus);
+ retval = get_windows_debug_event (ops, pid, ourstatus);
SetConsoleCtrlHandler (NULL, FALSE);
if (retval)
if (has_detach_ability ())
{
ptid_t ptid = {-1};
- windows_resume (ptid, 0, TARGET_SIGNAL_0);
+ windows_resume (ops, ptid, 0, TARGET_SIGNAL_0);
if (!kernel32_DebugActiveProcessStop (current_event.dwProcessId))
{
by "polling" it. If WaitForSingleObject returns WAIT_OBJECT_0
it means that the thread has died. Otherwise it is assumed to be alive. */
static int
-windows_thread_alive (ptid_t ptid)
+windows_thread_alive (struct target_ops *ops, ptid_t ptid)
{
int tid;