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).
This commit is contained in:
parent
0d4d2d38fb
commit
c222c1b294
|
@ -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 (¤t_event, 20000))
|
||||
if (!WaitForDebugEvent (¤t_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:
|
||||
|
|
Loading…
Reference in New Issue