This is an archive of the discontinued LLVM Phabricator instance.

Have a clean(er) shutdown when detaching from processes
ClosedPublic

Authored by zturner on Sep 18 2015, 1:10 PM.

Details

Reviewers
amccarth
Summary

Log file pre-patch:

1442531634.442000000 [0448/5520]: DoDetach called for process 25769804660 while state = 2673276.  Detaching...
1442531634.442000000 [0448/5520]: StopDebugging('false') called (inferior=2972).
1442531634.442000000 [0448/5520]: StopDebugging waiting for detach from process 2972 to complete.
1442531639.442000000 [0448/5520]: error: StopDebugging WaitForSingleObject(0x0000033C, 5000) returned 258
1442531639.442000000 [0448/5520]: Process::SetPrivateState (detached)

Log file post-patch:

1442606676.750000000 [4a20/574c]: DoDetach called for process 25769804636 while state = 2673276.  Detaching...
1442606676.750000000 [4a20/4c5c]: Process::lldb_private::Process::HandlePrivateEvent (pid = 19724) suppressing state running (old state running): should_broadcast == false
1442606676.750000000 [4a20/574c]: StopDebugging('false') called (inferior=19724).
1442606676.750000000 [4a20/4c5c]: Process::lldb_private::Process::WaitForEventsPrivate (timeout = 00000000, event_sp)...
1442606676.750000000 [4a20/574c]: StopDebugging waiting for detach from process 19724 to complete.
1442606676.750000000 [4a20/4a78]: Breakpoint exception is cue to detach from process 0x4d0c
1442606676.750000000 [4a20/4a78]: WaitForDebugEvent loop completed, exiting.
1442606676.750000000 [4a20/574c]: StopDebugging detach from process 19724 completed successfully.

Diff Detail

Event Timeline

zturner updated this revision to Diff 35127.Sep 18 2015, 1:10 PM
zturner retitled this revision from to Have a clean(er) shutdown when detaching from processes.
zturner updated this object.
zturner added a reviewer: amccarth.
zturner updated this object.
zturner added a subscriber: lldb-commits.
amccarth accepted this revision.Sep 18 2015, 1:36 PM
amccarth edited edge metadata.
amccarth added inline comments.
source/Plugins/Process/Windows/Live/DebuggerThread.cpp
309

Open brace goes on the next line. (Which appears to have originally been my mistake. Sorry.)

316

This is fine, but I'm growing concerned about the growing spaghetti-ness. It's too bad we can't push this logic down into HandleExceptionEvent, in order to keep the cases in this deeply-nested switch statement easy to understand.

This revision is now accepted and ready to land.Sep 18 2015, 1:36 PM

I should be able to move it into HandleExceptionEvent

zturner closed this revision.Oct 15 2015, 1:52 PM