Index: lldb/source/Plugins/Process/scripted/ScriptedProcess.h =================================================================== --- lldb/source/Plugins/Process/scripted/ScriptedProcess.h +++ lldb/source/Plugins/Process/scripted/ScriptedProcess.h @@ -47,6 +47,8 @@ Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override; + void DidLaunch() override; + void DidResume() override; Status DoResume() override; Index: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp =================================================================== --- lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp +++ lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp @@ -168,7 +168,10 @@ return {}; } +void ScriptedProcess::DidLaunch() { m_pid = GetInterface().GetProcessID(); } + void ScriptedProcess::DidResume() { + // Update the PID again, in case the user provided a placeholder pid at launch m_pid = GetInterface().GetProcessID(); GetLoadedDynamicLibrariesInfos(); }