[Lldb-commits] [lldb] [lldb-dap] Fix: disableASLR launch argument not working. (PR #129753)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 5 08:39:15 PST 2025
================
@@ -31,7 +31,18 @@ MakeArgv(const llvm::ArrayRef<std::string> &strs) {
return argv;
}
-// Both attach and launch take a either a sourcePath or sourceMap
+static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj,
+ llvm::StringRef key, lldb::LaunchFlags mask,
+ bool default_value) {
+ if (GetBoolean(obj, key).value_or(default_value))
+ flags |= mask;
+ else
+ flags &= ~mask;
+
+ return flags;
+}
----------------
JDevlieghere wrote:
This still doesn't distinguish between the value not being set and the value being set to `true` or `false`. Here's what I was suggesting:
```suggestion
static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj,
llvm::StringRef key, lldb::LaunchFlags mask) {
if (auto b = GetBoolean(obj, key)) {
if (*b)
flags |= mask;
else
flags &= ~mask;
}
return flags;
}
```
https://github.com/llvm/llvm-project/pull/129753
More information about the lldb-commits
mailing list