jankratochvil added inline comments.

================
Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:1354
+  auto region_it = llvm::find_if(m_mem_region_cache, [](const auto &pair) {
+    return pair.first.GetExecutable() == MemoryRegionInfo::eYes;
+  });
----------------
Finding arbitrary address would not be safe if LLDB supports [[ 
https://lldb.llvm.org/status/projects.html#non-stop-debugging | non-stop mode 
if implemented ]]. It also makes the address a bit non-deterministic. IIRC GDB 
is using executable's e_entry (="_start" if it exists). But I do not have any 
strong reason for that.



================
Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:1444
+    prot |= PROT_EXEC;
+
+  llvm::Expected<uint64_t> Result =
----------------
Some sanity check 'permissions' does not have set a bit which 
NativeProcessLinux::AllocateMemory does not understand?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89124/new/

https://reviews.llvm.org/D89124

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to