Make sure the public state is eStateStopped when we return from SBTarget::LoadCore() by hijacking the public event queue so we can ensure that the event gets consumed and the public state of the process (StateType SBProcess::GetState()) returns eStateStopped.

llvm-svn: 230066
This commit is contained in:
Greg Clayton 2015-02-20 21:51:06 +00:00
parent 83a1437646
commit 338d0bdc96
1 changed files with 2 additions and 2 deletions

View File

@ -3164,7 +3164,7 @@ Process::LoadCore ()
if (error.Success()) if (error.Success())
{ {
Listener listener ("lldb.process.load_core_listener"); Listener listener ("lldb.process.load_core_listener");
HijackPrivateProcessEvents(&listener); HijackProcessEvents(&listener);
if (PrivateStateThreadIsValid ()) if (PrivateStateThreadIsValid ())
ResumePrivateStateThread (); ResumePrivateStateThread ();
@ -3199,7 +3199,7 @@ Process::LoadCore ()
log->Printf("Process::Halt() failed to stop, state is: %s", StateAsCString(state)); log->Printf("Process::Halt() failed to stop, state is: %s", StateAsCString(state));
error.SetErrorString ("Did not get stopped event after loading the core file."); error.SetErrorString ("Did not get stopped event after loading the core file.");
} }
RestorePrivateProcessEvents (); RestoreProcessEvents ();
} }
return error; return error;
} }