File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
lldb/source/Plugins/Process/scripted Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,6 @@ void ScriptedProcess::DidLaunch() { m_pid = GetInterface().GetProcessID(); }
166166void ScriptedProcess::DidResume () {
167167 // Update the PID again, in case the user provided a placeholder pid at launch
168168 m_pid = GetInterface ().GetProcessID ();
169- GetLoadedDynamicLibrariesInfos ();
170169}
171170
172171Status ScriptedProcess::DoResume () {
Original file line number Diff line number Diff line change 1212#include " lldb/Target/Process.h"
1313#include " lldb/Utility/ConstString.h"
1414#include " lldb/Utility/ScriptedMetadata.h"
15+ #include " lldb/Utility/State.h"
1516#include " lldb/Utility/Status.h"
1617
1718#include " ScriptedThread.h"
@@ -93,6 +94,11 @@ class ScriptedProcess : public Process {
9394 void *GetImplementation () override ;
9495
9596 void ForceScriptedState (lldb::StateType state) override {
97+ // If we're about to stop, we should fetch the loaded dynamic libraries
98+ // dictionary before emitting the private stop event to avoid having the
99+ // module loading happen while the process state is changing.
100+ if (StateIsStoppedState (state, true ))
101+ GetLoadedDynamicLibrariesInfos ();
96102 SetPrivateState (state);
97103 }
98104
You can’t perform that action at this time.
0 commit comments