4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 12:05:47 +08:00

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.
This commit is contained in:
Jon Turney 2020-09-07 16:24:39 +01:00
parent 232fde0e76
commit f4a1b6ae18
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81

View File

@ -407,6 +407,8 @@ report (const char *in_fn, bool multiple)
} }
break; break;
case EXIT_PROCESS_DEBUG_EVENT: case EXIT_PROCESS_DEBUG_EVENT:
if (ev.u.ExitProcess.dwExitCode != 0)
process_fn = fn_win;
print_and_exit: print_and_exit:
print_dlls (&dll_list, isdll ? fn_win : NULL, process_fn); print_dlls (&dll_list, isdll ? fn_win : NULL, process_fn);
exitnow = true; exitnow = true;