diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-09-07 16:24:39 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2020-09-11 13:27:03 +0100 |
commit | f4a1b6ae182aaebd5b5a69f3f31ef633bc174464 (patch) | |
tree | c9eaa4a220c99db788a6990572466cd472c5f6ef | |
parent | 232fde0e76db14fc59912d0022b72c7739f1d598 (diff) | |
download | cygnal-f4a1b6ae182aaebd5b5a69f3f31ef633bc174464.tar.gz cygnal-f4a1b6ae182aaebd5b5a69f3f31ef633bc174464.tar.bz2 cygnal-f4a1b6ae182aaebd5b5a69f3f31ef633bc174464.zip |
Cygwin: ldd: Also look for not found DLLs when exit status is non-zero
If the process exited with e.g. STATUS_DLL_NOT_FOUND, also process the
file to look for not found DLLs.
(We currently only do this when a STATUS_DLL_NOT_FOUND exception occurs,
which I haven't managed to observe)
This still isn't 100% correct, as it only examines the specified file
for missing DLLs, not recursively on the DLLs it depends upon.
-rw-r--r-- | winsup/utils/ldd.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc index e1af99e12..1e1863c1c 100644 --- a/winsup/utils/ldd.cc +++ b/winsup/utils/ldd.cc @@ -407,6 +407,8 @@ report (const char *in_fn, bool multiple) } break; case EXIT_PROCESS_DEBUG_EVENT: + if (ev.u.ExitProcess.dwExitCode != 0) + process_fn = fn_win; print_and_exit: print_dlls (&dll_list, isdll ? fn_win : NULL, process_fn); exitnow = true; |