diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-12-12 12:12:24 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-12-12 12:12:24 +0000 |
commit | 1feea0bfd74d260dcd52618edec238808ada47ac (patch) | |
tree | 557b28e8036ca44a53ffd481e14d8033a64a9f6d /winsup/cygwin/exceptions.cc | |
parent | 5c80ea02302e031225003689df63eb206d248a35 (diff) | |
download | cygnal-1feea0bfd74d260dcd52618edec238808ada47ac.tar.gz cygnal-1feea0bfd74d260dcd52618edec238808ada47ac.tar.bz2 cygnal-1feea0bfd74d260dcd52618edec238808ada47ac.zip |
* dcrt0.cc: Include string.h.
(initial_env): Use small_printf's %P specifier.
* dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH
for path name buffer size.
* dll_init.h (struct dll): Ditto.
* environ.cc: Include string.h.
(win_env::add_cache): Use temporary local buffer for path conversion.
(posify): Ditto.
* exceptions.cc (try_to_debug): Use CreateProcessW to allow long path
names.
* miscfuncs.cc: Drop unused implementations of strcasematch and
strncasematch.
(ch_case_eq): Drop.
(strcasestr): Drop.
(cygwin_wcscasecmp): New function.
(cygwin_wcsncasecmp): New function.
(cygwin_strcasecmp): New function.
(cygwin_strncasecmp): New function.
(cygwin_wcslwr): New function.
(cygwin_wcsupr): New function.
(cygwin_strlwr): New function.
(cygwin_strupr): New function.
* ntdll.h (RtlDowncaseUnicodeString): Declare.
(RtlUpcaseUnicodeString): Declare.
(RtlInt64ToHexUnicodeString): Fix typo in comment.
* string.h: Disable not NLS aware implementations of strcasematch
and strncasematch.
(cygwin_strcasecmp): Declare.
(strcasecmp): Define as cygwin_strcasecmp.
(cygwin_strncasecmp): Declare.
(strncasecmp): Define as cygwin_strncasecmp.
(strcasematch):Define using cygwin_strcasecmp.
(strncasematch):Define using cygwin_strncasecmp.
(cygwin_strlwr): Declare.
(strlwr): Define as cygwin_strlwr.
(cygwin_strupr): Declare.
(strupr): Define as cygwin_strupr.
* wchar.h: New file.
* wincap.cc (wincapc::init): Use "NT" as fix OS string.
* winsup.h (strcasematch): Drop declaration.
(strncasematch): Ditto.
(strcasestr): Ditto.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index d030f130d..06a9b5409 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -331,6 +331,8 @@ cygwin_stackdump () extern "C" int try_to_debug (bool waitloop) { + WCHAR dbg_cmd[sizeof debugger_command]; + debug_printf ("debugger_command '%s'", debugger_command); if (*debugger_command == '\0') return 0; @@ -347,7 +349,7 @@ try_to_debug (bool waitloop) SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST); PROCESS_INFORMATION pi = {NULL, 0, 0, 0}; - STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}; + STARTUPINFOW si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}; si.lpReserved = NULL; si.lpDesktop = NULL; si.dwFlags = 0; @@ -382,16 +384,17 @@ try_to_debug (bool waitloop) console_printf ("*** starting debugger for pid %u, tid %u\n", cygwin_pid (GetCurrentProcessId ()), GetCurrentThreadId ()); BOOL dbg; - dbg = CreateProcess (NULL, - debugger_command, - NULL, - NULL, - FALSE, - CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP, - NULL, - NULL, - &si, - &pi); + sys_mbstowcs (dbg_cmd, debugger_command, sizeof debugger_command); + dbg = CreateProcessW (NULL, + dbg_cmd, + NULL, + NULL, + FALSE, + CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP, + NULL, + NULL, + &si, + &pi); if (!dbg) system_printf ("Failed to start debugger, %E"); |