]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: ldd: Also look for not found DLLs when exit status is non-zero
authorJon Turney <jon.turney@dronecode.org.uk>
Mon, 7 Sep 2020 15:24:39 +0000 (16:24 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 11 Sep 2020 12:27:03 +0000 (13:27 +0100)
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.

winsup/utils/ldd.cc

index e1af99e1289909c483667f3bab3219be2db5715b..1e1863c1c0a6c3bb3fc755695330483ccb2214a2 100644 (file)
@@ -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;
This page took 0.031951 seconds and 5 git commands to generate.