forked from OSchip/llvm-project
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:
parent
83a1437646
commit
338d0bdc96
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue