[Lldb-commits] [lldb] [debugserver] Fix debugserver build on < macOS 10.15 (PR #166599)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 5 09:49:46 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Jonas Devlieghere (JDevlieghere)
<details>
<summary>Changes</summary>
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends. Support using the constant on older OSes.
Fixes #<!-- -->156144
---
Full diff: https://github.com/llvm/llvm-project/pull/166599.diff
1 Files Affected:
- (modified) lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp (+5)
``````````diff
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
index 9d0d60fdaaed9..34c5c9a025e5b 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
@@ -15,6 +15,11 @@
#include <cassert>
#include <mach/mach_vm.h>
+// From <mach/vm_statistics.h>, but not on older OSs.
+#ifndef VM_MEMORY_SANITIZER
+#define VM_MEMORY_SANITIZER 99
+#endif
+
MachVMRegion::MachVMRegion(task_t task)
: m_task(task), m_addr(INVALID_NUB_ADDRESS), m_err(),
m_start(INVALID_NUB_ADDRESS), m_size(0), m_depth(-1),
``````````
</details>
https://github.com/llvm/llvm-project/pull/166599
More information about the lldb-commits
mailing list