static struct x86_debug_reg_state debug_reg_state;
+/* The inferior's target description. This is a global because the
+ Windows ports support neither bi-arch nor multi-process. */
+static const_target_desc_up win32_tdesc;
+#ifdef __x86_64__
+static const_target_desc_up wow64_win32_tdesc;
+#endif
+
static void
update_debug_registers (thread_info *thread)
{
}
static void
-i386_initial_stuff (void)
+i386_initial_stuff (process_info *proc)
{
+#ifdef __x86_64__
+ if (windows_process.wow64_process)
+ proc->tdesc = wow64_win32_tdesc.get ();
+ else
+#endif
+ proc->tdesc = win32_tdesc.get ();
+
x86_low_init_dregs (&debug_reg_state);
}
int using_threads = 1;
-const_target_desc_up win32_tdesc;
-#ifdef __x86_64__
-const_target_desc_up wow64_win32_tdesc;
-#endif
-
#define NUM_REGS (the_low_target.num_regs ())
/* The current debug event from WaitForDebugEvent. */
#endif
proc = add_process (pid, attached);
-#ifdef __x86_64__
- if (windows_process.wow64_process)
- proc->tdesc = wow64_win32_tdesc.get ();
- else
-#endif
- proc->tdesc = win32_tdesc.get ();
child_init_thread_list ();
windows_process.child_initialization_done = 0;
if (the_low_target.initial_stuff != NULL)
- (*the_low_target.initial_stuff) ();
+ (*the_low_target.initial_stuff) (proc);
windows_process.cached_status.set_ignore ();
struct target_desc;
-/* The inferior's target description. This is a global because the
- Windows ports support neither bi-arch nor multi-process. */
-extern const_target_desc_up win32_tdesc;
-#ifdef __x86_64__
-extern const_target_desc_up wow64_win32_tdesc;
-#endif
-
#ifdef __CYGWIN__
constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_CYGWIN;
#else
int (*num_regs) (void);
/* Perform initializations on startup. */
- void (*initial_stuff) (void);
+ void (*initial_stuff) (process_info *proc);
/* Fetch the context from the inferior. */
void (*get_thread_context) (windows_nat::windows_thread_info *th);