summaryrefslogtreecommitdiff
path: root/lldb/tools/lldb-dap/Handler
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-dap/Handler')
-rw-r--r--lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp
index b499a69876e2..9069de4a3a69 100644
--- a/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp
@@ -42,8 +42,11 @@ llvm::Expected<InitializeResponse> InitializeRequestHandler::Run(
// The sourceInitFile option is not part of the DAP specification. It is an
// extension used by the test suite to prevent sourcing `.lldbinit` and
- // changing its behavior.
- if (arguments.lldbExtSourceInitFile.value_or(true)) {
+ // changing its behavior. The CLI flag --no-lldbinit takes precedence over
+ // the DAP parameter.
+ bool should_source_init_files =
+ !dap.no_lldbinit && arguments.lldbExtSourceInitFile.value_or(true);
+ if (should_source_init_files) {
dap.debugger.SkipLLDBInitFiles(false);
dap.debugger.SkipAppInitFiles(false);
lldb::SBCommandReturnObject init;