Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-07-06 17:10:40 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2020-07-31 16:01:02 +0300
commitc222c1b294c7d6e2b0e554aa2fbde79c8b768594 (patch)
treed4cdbe26f0d9698e082f1f619229edd34a479951 /winsup
parent0d4d2d38fbdf923f379a89b82b6a63580abbaed2 (diff)
Cygwin: Speed up dumper
Stop after we've written the dump in response to the initial breakpoint EXCEPTION_DEBUG_EVENT we recieve for attaching to the process. (rather than bogusly sitting there for 20 seconds waiting for more debug events from a stopped process after we've already written the dump).
Diffstat (limited to 'winsup')
-rw-r--r--winsup/utils/dumper.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
index 816320e6d..5f8121aa3 100644
--- a/winsup/utils/dumper.cc
+++ b/winsup/utils/dumper.cc
@@ -615,8 +615,6 @@ out:
int
dumper::collect_process_information ()
{
- int exception_level = 0;
-
if (!sane ())
return 0;
@@ -631,7 +629,7 @@ dumper::collect_process_information ()
while (1)
{
- if (!WaitForDebugEvent (&current_event, 20000))
+ if (!WaitForDebugEvent (&current_event, INFINITE))
return 0;
deb_printf ("got debug event %d\n", current_event.dwDebugEventCode);
@@ -675,12 +673,6 @@ dumper::collect_process_information ()
case EXCEPTION_DEBUG_EVENT:
- exception_level++;
- if (exception_level == 2)
- break;
- else if (exception_level > 2)
- return 0;
-
collect_memory_sections ();
/* got all info. time to dump */
@@ -697,6 +689,9 @@ dumper::collect_process_information ()
goto failed;
};
+ /* We're done */
+ goto failed;
+
break;
default: