[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap.cpp to not use global DAP variable. (PR #116272)
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 14 12:50:10 PST 2024
================
@@ -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;
----------------
walter-erquinigo wrote:
can you add the debug_adaptor_path and the repl_mode in the constrsuctor of the Dap class?
https://github.com/llvm/llvm-project/pull/116272
More information about the lldb-commits
mailing list