public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: ldd: Also look for not found DLLs when exit status is non-zero
Date: Fri, 11 Sep 2020 12:27:27 +0000 (GMT)	[thread overview]
Message-ID: <20200911122727.553EB386F001@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f4a1b6ae182aaebd5b5a69f3f31ef633bc174464

commit f4a1b6ae182aaebd5b5a69f3f31ef633bc174464
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Sep 7 16:24:39 2020 +0100

    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.

Diff:
---
 winsup/utils/ldd.cc | 2 ++
 1 file changed, 2 insertions(+)

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;


                 reply	other threads:[~2020-09-11 12:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200911122727.553EB386F001@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).