[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 25 09:13:12 PDT 2025
================
@@ -37,14 +39,12 @@ MakeArgv(const llvm::ArrayRef<std::string> &strs) {
return argv;
}
-static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj,
- llvm::StringRef key, lldb::LaunchFlags mask) {
- if (const auto opt_value = GetBoolean(obj, key)) {
- if (*opt_value)
- flags |= mask;
- else
- flags &= ~mask;
- }
+static uint32_t SetLaunchFlag(uint32_t flags, bool flag,
+ lldb::LaunchFlags mask) {
+ if (flag)
+ flags |= mask;
+ else
+ flags &= ~mask;
----------------
ashgti wrote:
For the launch.json, we're the ones defining the fields and their defaults, defined in the package.json https://github.com/llvm/llvm-project/blob/5dc2d668e68613e8898c5c42960d792129453e9d/lldb/tools/lldb-dap/package.json#L226-L250
The defaults I'm specifying in the `LaunchRequestArguments` are setup to match those defaults as well. We can change the defaults, since this part is defined by the lldb-dap itself.
https://github.com/llvm/llvm-project/pull/133624
More information about the lldb-commits
mailing list