+2010-01-27 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * windows-nat.c (windows_initialization_done): New variable.
+ (get_windows_debug_event): Issue error when process dies before
+ completely initializing.
+ (do_initial_windows_stuff): Set flag to indicate when we are done with
+ the initial steps of attaching to the child.
+
2010-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
* symtab.h (struct symbol <symtab>): New comment on NULL values.
static uintptr_t dr[8];
static int debug_registers_changed;
static int debug_registers_used;
+
+static int windows_initialization_done;
#define DR6_CLEAR_VALUE 0xffff0ff0
/* The string sent by cygwin when it processes a signal.
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"EXIT_PROCESS_DEBUG_EVENT"));
- if (saw_create != 1)
- break;
- ourstatus->kind = TARGET_WAITKIND_EXITED;
- ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
- retval = main_thread_id;
+ if (!windows_initialization_done)
+ {
+ target_terminal_ours ();
+ target_mourn_inferior ();
+ error (_("During startup program exited with code 0x%x."),
+ (unsigned int) current_event.u.ExitProcess.dwExitCode);
+ }
+ else if (saw_create == 1)
+ {
+ ourstatus->kind = TARGET_WAITKIND_EXITED;
+ ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
+ retval = main_thread_id;
+ }
break;
case LOAD_DLL_DEBUG_EVENT:
terminal_init_inferior_with_pgrp (pid);
target_terminal_inferior ();
+ windows_initialization_done = 0;
inf->stop_soon = STOP_QUIETLY;
while (1)
{
break;
}
+ windows_initialization_done = 1;
inf->stop_soon = NO_STOP_QUIETLY;
stop_after_trap = 0;
return;