================
@@ -5046,30 +5026,50 @@ int main(int argc, char *argv[]) {
     pause();
   }
 #endif
+
+  // Initialize LLDB first before we do anything.
+  lldb::SBDebugger::Initialize();
+
+  // Terminate the debugger before the C++ destructor chain kicks in.
+  auto terminate_debugger =
+      llvm::make_scope_exit([] { lldb::SBDebugger::Terminate(); });
+
+  DAP dap;
+  dap.debug_adaptor_path = program_path.str().str();
+  dap.repl_mode = defaultReplMode;
----------------
ashgti wrote:

Done, moved those both to the constructor.

https://github.com/llvm/llvm-project/pull/116272
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to