aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authorEmre Kultursay <emrekultursay@google.com>2022-07-01 13:44:01 +0800
committerYi Kong <yikong@google.com>2022-07-01 13:45:42 +0800
commitc0702ac07b8e206f424930ff0331151954fb821c (patch)
treed0aa31f0b22054cb2dbf2556cb1cf5486bc79ce7 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parent6bd53df9b6e9fffb440ee2f9020f15b61f8b39e7 (diff)
downloadllvm-c0702ac07b8e206f424930ff0331151954fb821c.zip
llvm-c0702ac07b8e206f424930ff0331151954fb821c.tar.gz
llvm-c0702ac07b8e206f424930ff0331151954fb821c.tar.bz2
[PATCH] [lldb-server] Skip shared regions for memory allocation
Differential Revision: https://reviews.llvm.org/D128832
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 0fb4c69..90118f9 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1227,7 +1227,8 @@ llvm::Expected<uint64_t>
NativeProcessLinux::Syscall(llvm::ArrayRef<uint64_t> 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(),