and use it when pushing the target.
(win32_attach, win32_create_inferior): Update call to
do_initial_win32_stuff.
(win32_detach, win32_mourn_inferior): Use our ops parameter
instead of the global win32_ops to unpush the target.
+2009-01-07 Joel Brobecker <brobecker@adacore.com>
+
+ * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
+ and use it when pushing the target.
+ (win32_attach, win32_create_inferior): Update call to
+ do_initial_win32_stuff.
+ (win32_detach, win32_mourn_inferior): Use our ops parameter
+ instead of the global win32_ops to unpush the target.
+
2009-01-09 Joel Brobecker <brobecker@adacore.com>
* ser-mingw.c (ser_windows_open): Use proper type when casting
}
static void
-do_initial_win32_stuff (DWORD pid, int attaching)
+do_initial_win32_stuff (struct target_ops *ops, DWORD pid, int attaching)
{
extern int stop_after_trap;
int i;
#endif
current_event.dwProcessId = pid;
memset (¤t_event, 0, sizeof (current_event));
- push_target (&win32_ops);
+ push_target (ops);
disable_breakpoints_in_shlibs ();
win32_clear_solib ();
clear_proceed_status ();
gdb_flush (gdb_stdout);
}
- do_initial_win32_stuff (pid, 1);
+ do_initial_win32_stuff (ops, pid, 1);
target_terminal_ours ();
}
inferior_ptid = null_ptid;
detach_inferior (current_event.dwProcessId);
- unpush_target (&win32_ops);
+ unpush_target (ops);
}
static char *
else
saw_create = 0;
- do_initial_win32_stuff (pi.dwProcessId, 0);
+ do_initial_win32_stuff (ops, pi.dwProcessId, 0);
/* win32_continue (DBG_CONTINUE, -1); */
}
CHECK (CloseHandle (current_process_handle));
open_process_used = 0;
}
- unpush_target (&win32_ops);
+ unpush_target (ops);
generic_mourn_inferior ();
}
}
static void
-do_initial_win32_stuff (DWORD pid, int attaching)
+do_initial_win32_stuff (struct target_ops *ops, DWORD pid, int attaching)
{
extern int stop_after_trap;
int i;
#endif
current_event.dwProcessId = pid;
memset (¤t_event, 0, sizeof (current_event));
- push_target (&win32_ops);
+ push_target (ops);
disable_breakpoints_in_shlibs ();
win32_clear_solib ();
clear_proceed_status ();
gdb_flush (gdb_stdout);
}
- do_initial_win32_stuff (pid, 1);
+ do_initial_win32_stuff (ops, pid, 1);
target_terminal_ours ();
}
inferior_ptid = null_ptid;
detach_inferior (current_event.dwProcessId);
- unpush_target (&win32_ops);
+ unpush_target (ops);
}
static char *
else
saw_create = 0;
- do_initial_win32_stuff (pi.dwProcessId, 0);
+ do_initial_win32_stuff (ops, pi.dwProcessId, 0);
/* win32_continue (DBG_CONTINUE, -1); */
}
CHECK (CloseHandle (current_process_handle));
open_process_used = 0;
}
- unpush_target (&win32_ops);
+ unpush_target (ops);
generic_mourn_inferior ();
}