]> sourceware.org Git - newlib-cygwin.git/commitdiff
ldd: terminate process on hitting breakpoint
authorCorinna Vinschen <corinna@vinschen.de>
Sat, 2 Jul 2016 10:27:04 +0000 (12:27 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Sat, 2 Jul 2016 10:27:04 +0000 (12:27 +0200)
So far ldd terminates the inferior process as soon as some thread
is started.  Apparently threads are started from even ntdll.dll
before the main thread of the application is started.  As a result
the dll list is cut short since ldd terminates prematurely.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/utils/ldd.cc

index 152119f2e9081c3e7313be88869e455d94994d76..8a33984d1fc5cf5d137321d6bd49f0bdae8ab72a 100644 (file)
@@ -352,13 +352,10 @@ report (const char *in_fn, bool multiple)
              break;
            case STATUS_BREAKPOINT:
              if (!isdll)
-               cont = DBG_EXCEPTION_NOT_HANDLED;
+               TerminateProcess (hProcess, 0);
              break;
            }
          break;
-       case CREATE_THREAD_DEBUG_EVENT:
-         TerminateProcess (hProcess, 0);
-         break;
        case EXIT_PROCESS_DEBUG_EVENT:
 print_and_exit:
          print_dlls (&dll_list, isdll ? fn_win : NULL, process_fn);
This page took 0.029389 seconds and 5 git commands to generate.