diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-02-28 17:09:34 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-02-28 17:09:34 +0000 |
commit | 5003a3d1c5a197e34ea684d3e3f6d4a2daf1ff49 (patch) | |
tree | a2f0a0e56967512cd6ef806bfcae5931f7c53eb3 /winsup/cygwin/exceptions.cc | |
parent | 6965e469611070aa84620c55220f02b017e15fd1 (diff) | |
download | cygnal-5003a3d1c5a197e34ea684d3e3f6d4a2daf1ff49.tar.gz cygnal-5003a3d1c5a197e34ea684d3e3f6d4a2daf1ff49.tar.bz2 cygnal-5003a3d1c5a197e34ea684d3e3f6d4a2daf1ff49.zip |
* exceptions.cc (open_stackdumpfile): Add comments.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index a903852ee..999094d30 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -145,18 +145,21 @@ open_stackdumpfile () WCHAR corefile[strlen (p) + sizeof (".stackdump")]; UNICODE_STRING ucore; OBJECT_ATTRIBUTES attr; + /* Create the UNICODE variation of <progname>.stackdump. */ RtlInitEmptyUnicodeString (&ucore, corefile, sizeof corefile - sizeof (WCHAR)); ucore.Length = sys_mbstowcs (ucore.Buffer, ucore.MaximumLength / sizeof (WCHAR), p, strlen (p)) * sizeof (WCHAR); RtlAppendUnicodeToString (&ucore, L".stackdump"); + /* Create an object attribute which refers to <progname>.stackdump + in Cygwin's cwd. */ InitializeObjectAttributes (&attr, &ucore, OBJ_CASE_INSENSITIVE, cygheap->cwd.get_handle (), NULL); HANDLE h; IO_STATUS_BLOCK io; NTSTATUS status; - + /* Try to open it to dump the stack in it. */ status = NtCreateFile (&h, GENERIC_WRITE | SYNCHRONIZE, &attr, &io, NULL, FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF, FILE_SYNCHRONOUS_IO_NONALERT |