diff options
author | Christopher Faylor <me@cgf.cx> | 2004-02-18 22:32:15 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-02-18 22:32:15 +0000 |
commit | 0e061ecf96928e04e46bf07ce87e81a7d2fd00a6 (patch) | |
tree | 139dca3eaef2a57a2078786010ebfbbde17bee0f /winsup/cygwin/dcrt0.cc | |
parent | 2d6c4a1a65051b08422c1503ba648e9cee0a0acc (diff) | |
download | cygnal-0e061ecf96928e04e46bf07ce87e81a7d2fd00a6.tar.gz cygnal-0e061ecf96928e04e46bf07ce87e81a7d2fd00a6.tar.bz2 cygnal-0e061ecf96928e04e46bf07ce87e81a7d2fd00a6.zip |
* fork.cc (fork_child): Invert sense of test which defeated correct handling in
a fork from a non-main thread.
* dcrt0.cc (initial_env): Eliminate parameter and just send DebugBreak when
appropriate.
(dll_crt0_0): Reflect parameter change to initial_env.
(dll_crt0_1): Don't call initial_env.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 4d48314e7..06982e653 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -536,25 +536,15 @@ break_here () #endif static void -initial_env (bool first) +initial_env () { char buf[CYG_MAX_PATH + 1]; - if (!first) - /* nothing */; - else if (GetEnvironmentVariable ("CYGWIN_TESTING", buf, sizeof (buf) - 1)) + if (GetEnvironmentVariable ("CYGWIN_TESTING", buf, sizeof (buf) - 1)) _cygwin_testing = 1; + #ifdef DEBUGGING DWORD len; - static bool NO_COPY did_debugging_stuff; -#if 0 - if (did_debugging_stuff || (first && wincap.cant_debug_dll_entry ())) - return; -#else - if (first) - return; -#endif - did_debugging_stuff = true; if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf) - 1)) { DWORD ms = atoi (buf); @@ -583,6 +573,8 @@ initial_env (bool first) { error_start_init (p); try_to_debug (); + console_printf ("*** Sending Break. gdb may issue spurious SIGTRAP message.\n"); + DebugBreak (); break_here (); } } @@ -594,7 +586,7 @@ void __stdcall dll_crt0_0 () { wincap.init (); - initial_env (true); + initial_env (); char zeros[sizeof (child_proc_info->zero)] = {0}; @@ -736,7 +728,6 @@ dll_crt0_1 (char *) /* FIXME: Verify forked children get their exception handler set up ok. */ exception_list cygwin_except_entry; - initial_env (false); check_sanity_and_sync (user_data); malloc_init (); |