Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp =================================================================== --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -123,6 +123,18 @@ log->Printf ("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64 " reloaded auxv data", __FUNCTION__, m_process ? m_process->GetID () : LLDB_INVALID_PROCESS_ID); executable_sp = GetTargetExecutable(); + if (executable_sp == nullptr && m_process != nullptr) + { + auto& target = m_process->GetTarget(); + ProcessInstanceInfo process_info; + if (target.GetPlatform()->GetProcessInfo(m_process->GetID(), process_info)) + { + executable_sp.reset(new Module(ModuleSpec(process_info.GetExecutableFile(), target.GetArchitecture()))); + target.SetExecutableModule(executable_sp, false); + if (log) + log->Printf ("DynamicLoaderPOSIXDYLD::%s set new target executable %s using pid %" PRIu64, __FUNCTION__, process_info.GetExecutableFile().GetPath().c_str(), m_process->GetID()); + } + } load_offset = ComputeLoadOffset(); if (log) log->Printf ("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64 " executable '%s', load_offset 0x%" PRIx64, __FUNCTION__, m_process ? m_process->GetID () : LLDB_INVALID_PROCESS_ID, executable_sp ? executable_sp->GetFileSpec().GetPath().c_str () : "", load_offset);