================ @@ -5028,36 +5218,52 @@ int main(int argc, char *argv[]) { #endif // Initialize LLDB first before we do anything. - lldb::SBDebugger::Initialize(); + lldb::SBError error = lldb::SBDebugger::InitializeWithErrorHandling(); + if (error.Fail()) { + llvm::errs() << "Failed to initialize LLDB: " << error.GetCString() << "\n"; + return EXIT_FAILURE; + } // Terminate the debugger before the C++ destructor chain kicks in. auto terminate_debugger = llvm::make_scope_exit([] { lldb::SBDebugger::Terminate(); }); - DAP dap = DAP(program_path.str(), default_repl_mode); + if (portno != -1) { + llvm::errs() << llvm::format("Listening on port %i...\n", portno); + return AcceptConnection(program_path.str(), pre_init_commands, log, + default_repl_mode, portno); + } + + if (!unix_socket_path.empty()) { ---------------- ashgti wrote:
I adjusted this to take a single `--connection` argument that we can use to create a listener for instead of two arguments. https://github.com/llvm/llvm-project/pull/116392 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits