* configure.ac: Check for memmem declaration.
[deliverable/binutils-gdb.git] / gdb / windows-nat.c
index 07c7b60d53b4981522263c9be86f7dbc1e0aa952..8fedf9e60a36dd0eba5364568a24eeae92c6ea2e 100644 (file)
@@ -105,7 +105,7 @@ static int debug_registers_used;
 #define DEBUG_MEM(x)   if (debug_memory)       printf_unfiltered x
 #define DEBUG_EXCEPT(x)        if (debug_exceptions)   printf_unfiltered x
 
-static void win32_stop (void);
+static void win32_stop (ptid_t);
 static int win32_win32_thread_alive (ptid_t);
 static void win32_kill_inferior (void);
 
@@ -1302,7 +1302,7 @@ get_win32_debug_event (int pid, struct target_waitstatus *ourstatus)
              /* Kludge around a Windows bug where first event is a create
                 thread event.  Caused when attached process does not have
                 a main thread. */
-             retval = ourstatus->value.related_pid = fake_create_process ();
+             retval = fake_create_process ();
             if (retval)
               saw_create++;
            }
@@ -1342,7 +1342,7 @@ get_win32_debug_event (int pid, struct target_waitstatus *ourstatus)
       /* Add the main thread */
       th = win32_add_thread (main_thread_id,
                             current_event.u.CreateProcessInfo.hThread);
-      retval = ourstatus->value.related_pid = current_event.dwThreadId;
+      retval = current_event.dwThreadId;
       break;
 
     case EXIT_PROCESS_DEBUG_EVENT:
@@ -1928,7 +1928,7 @@ win32_mourn_inferior (void)
    ^C on the controlling terminal. */
 
 static void
-win32_stop (void)
+win32_stop (ptid_t ptid)
 {
   DEBUG_EVENTS (("gdb: GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)\n"));
   CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT, current_event.dwProcessId));
@@ -2085,6 +2085,7 @@ init_win32_ops (void)
   win32_ops.to_open = win32_open;
   win32_ops.to_close = win32_close;
   win32_ops.to_attach = win32_attach;
+  win32_ops.to_attach_no_wait = 1;
   win32_ops.to_detach = win32_detach;
   win32_ops.to_resume = win32_resume;
   win32_ops.to_wait = win32_wait;
This page took 0.025417 seconds and 4 git commands to generate.