diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-03-14 11:50:10 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-03-14 11:50:10 +0000 |
commit | 25486b7512d561b534a6d9319f4fc3beb5039217 (patch) | |
tree | 5d5497842ba5dfab9c763ed00d70c006a368ff4f /lldb/source/Target/Process.cpp | |
parent | 8ed6582bb06047db76934efe8a9314976e8fd843 (diff) | |
download | bcm5719-llvm-25486b7512d561b534a6d9319f4fc3beb5039217.tar.gz bcm5719-llvm-25486b7512d561b534a6d9319f4fc3beb5039217.zip |
Update selected thread after loading mach core
The OS plugins might have updated the thread list after a core file has
been loaded. The physical thread in the core file may no longer be the
one that should be selected. Hence we should run the thread selection
logic after loading the core.
Differential revision: https://reviews.llvm.org/D44139
llvm-svn: 327501
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index d54112ab5d8..c40894b357d 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2857,10 +2857,10 @@ Status Process::LoadCore() { // state. SetPrivateState(eStateStopped); - // Wait indefinitely for a stopped event since we just posted one above... + // Wait for a stopped event since we just posted one above... lldb::EventSP event_sp; - listener_sp->GetEvent(event_sp, llvm::None); - StateType state = ProcessEventData::GetStateFromEvent(event_sp.get()); + StateType state = + WaitForProcessToStop(seconds(10), &event_sp, true, listener_sp); if (!StateIsStoppedState(state, false)) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)); |