From c0702ac07b8e206f424930ff0331151954fb821c Mon Sep 17 00:00:00 2001 From: Emre Kultursay Date: Fri, 1 Jul 2022 13:44:01 +0800 Subject: [PATCH] [lldb-server] Skip shared regions for memory allocation Differential Revision: https://reviews.llvm.org/D128832 --- lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 0fb4c691118b..90118f9386da 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1227,7 +1227,8 @@ llvm::Expected NativeProcessLinux::Syscall(llvm::ArrayRef args) { PopulateMemoryRegionCache(); auto region_it = llvm::find_if(m_mem_region_cache, [](const auto &pair) { - return pair.first.GetExecutable() == MemoryRegionInfo::eYes; + return pair.first.GetExecutable() == MemoryRegionInfo::eYes && + pair.first.GetShared() != MemoryRegionInfo::eYes; }); if (region_it == m_mem_region_cache.end()) return llvm::createStringError(llvm::inconvertibleErrorCode(), -- cgit v1.2.3