diff options
Diffstat (limited to 'winsup/cygwin/assert.cc')
-rw-r--r-- | winsup/cygwin/assert.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc index 4c5a3b08f..063c7b852 100644 --- a/winsup/cygwin/assert.cc +++ b/winsup/cygwin/assert.cc @@ -28,9 +28,9 @@ __assert (const char *file, int line, const char *failedexpr) /* If we don't have a console in a Windows program, then bring up a message box for the assertion failure. */ - h = CreateFileA ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (h == INVALID_HANDLE_VALUE || h == 0) + h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) { char *buf; @@ -46,6 +46,9 @@ __assert (const char *file, int line, const char *failedexpr) failedexpr, file, line); } +#ifdef DEBUGGING + try_to_debug (); +#endif abort (); // FIXME: Someday this should work. /* NOTREACHED */ |