================ @@ -18,5 +20,18 @@ void HostInfoAIX::Terminate() { HostInfoBase::Terminate(); } FileSpec HostInfoAIX::GetProgramFileSpec() { static FileSpec g_program_filespec; + struct psinfo psinfoData; + auto BufferOrError = getProcFile(getpid(), "psinfo"); + if (BufferOrError) { + std::unique_ptr<llvm::MemoryBuffer> PsinfoBuffer = + std::move(*BufferOrError); + memcpy(&psinfoData, PsinfoBuffer->getBufferStart(), sizeof(psinfoData)); + llvm::StringRef exe_path( + psinfoData.pr_psargs, + strnlen(psinfoData.pr_psargs, sizeof(psinfoData.pr_psargs))); + if (!exe_path.empty()) { + g_program_filespec.SetFile(exe_path, FileSpec::Style::native); + } ---------------- labath wrote:
```suggestion if (!exe_path.empty()) g_program_filespec.SetFile(exe_path, FileSpec::Style::native); ``` https://github.com/llvm/llvm-project/pull/138687 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits