diff options
author | Christopher Faylor <me@cgf.cx> | 2002-07-15 03:48:52 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-07-15 03:48:52 +0000 |
commit | 56a42791a33e16ab52a02bc22be67390e6a9d34e (patch) | |
tree | 4904bb689512ce1df41644a21ca05f69b2eba34f | |
parent | 3d0ba393dfa79cb4a43a3a753ad64f5caaae37cb (diff) | |
download | cygnal-56a42791a33e16ab52a02bc22be67390e6a9d34e.tar.gz cygnal-56a42791a33e16ab52a02bc22be67390e6a9d34e.tar.bz2 cygnal-56a42791a33e16ab52a02bc22be67390e6a9d34e.zip |
* dcrt0.cc (initial_env): Force path and CYGWIN_DEBUG contents to lower case.
* exceptions.cc (error_start_init): Use the name derived from GetModuleName
rather than myself->progname.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 13 |
3 files changed, 16 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fe427c621..3720f3415 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,12 @@ 2002-07-14 Christopher Faylor <cgf@redhat.com> + * dcrt0.cc (initial_env): Force path and CYGWIN_DEBUG contents to lower + case. + * exceptions.cc (error_start_init): Use the name derived from + GetModuleName rather than myself->progname. + +2002-07-14 Christopher Faylor <cgf@redhat.com> + * dcrt0.cc (dll_crt0_1): Move debug_init call back to here. Avoid a compiler warning. * shared.cc (memory_init): Remove debug_init call. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index da3b5d52f..26e70b22e 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -810,6 +810,8 @@ initial_env () { char buf1[MAX_PATH + 1]; len = GetModuleFileName (NULL, buf1, MAX_PATH); + strlwr (buf1); + strlwr (buf); char *p = strchr (buf, '='); if (!p) p = (char *) "gdb.exe -nw"; diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 1eb3fbac2..764ae5a84 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -148,11 +148,13 @@ error_start_init (const char *buf) return; } - char myself_posix_name[MAX_PATH]; + char pgm[MAX_PATH + 1]; + if (!GetModuleFileName (NULL, pgm, MAX_PATH)) + strcpy (pgm, "cygwin1.dll"); + for (char *p = strchr (pgm, '\\'); p; p = strchr (p, '\\')) + *p = '/'; - /* FIXME: gdb cannot use win32 paths, but what if debugger isn't gdb? */ - cygwin_conv_to_posix_path (myself->progname, myself_posix_name); - __small_sprintf (debugger_command, "%s %s", buf, myself_posix_name); + __small_sprintf (debugger_command, "%s %s", buf, pgm); } static void @@ -341,8 +343,6 @@ try_to_debug (bool waitloop) __small_sprintf (strchr (debugger_command, '\0'), " %u", GetCurrentProcessId ()); - BOOL dbg; - SetThreadPriority (hMainThread, THREAD_PRIORITY_HIGHEST); PROCESS_INFORMATION pi = {NULL, 0, 0, 0}; @@ -375,6 +375,7 @@ try_to_debug (bool waitloop) } } + BOOL dbg; dbg = CreateProcess (NULL, debugger_command, NULL, |