diff options
-rw-r--r-- | winsup/cygwin/environ.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/globals.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index dca5c5d..d35b956 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -122,6 +122,7 @@ static struct parse_thing {"wincmdln", {&wincmdln}, setbool, NULL, {{false}, {true}}}, {"winsymlinks", {func: set_winsymlinks}, isfunc, NULL, {{0}, {0}}}, {"disable_pcon", {&disable_pcon}, setbool, NULL, {{false}, {true}}}, + {"winjitdebug", {&winjitdebug}, setbool, NULL, {{false}, {true}}}, {NULL, {0}, setdword, 0, {{0}, {0}}} }; diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index a94aa56..d14ea59 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -72,6 +72,7 @@ bool reset_com; bool wincmdln; winsym_t allow_winsymlinks = WSYM_default; bool disable_pcon; +bool winjitdebug = false; /* Taken from BSD libc: This variable is zero until a process has created a pthread. It is used diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index dc1c4ac..77dc6df 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -413,7 +413,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, get the default error mode instead of inheriting the mode Cygwin uses. This allows things like Windows Error Reporting/JIT debugging to work with processes launched from a Cygwin shell. */ - if (!real_path.iscygexec ()) + if (winjitdebug && !real_path.iscygexec ()) c_flags |= CREATE_DEFAULT_ERROR_MODE; /* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround |