Skip to content

Commit 882f149

Browse files
committed
Removed the flag g_listen_gdb.
1 parent 8491aa0 commit 882f149

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lldb/tools/lldb-server/lldb-platform.cpp

+1-14
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ using namespace llvm;
5151
static int g_debug = 0;
5252
static int g_verbose = 0;
5353
static int g_server = 0;
54-
static volatile bool g_listen_gdb = true;
5554

5655
static struct option g_long_options[] = {
5756
{"debug", no_argument, &g_debug, 1},
@@ -244,7 +243,7 @@ gdb_thread_proc(Acceptor *acceptor_gdb, uint16_t gdbserver_port,
244243
Log *log = GetLog(LLDBLog::Platform);
245244
GDBRemoteCommunicationServerPlatform platform(Socket::ProtocolTcp,
246245
gdbserver_port);
247-
while (g_listen_gdb) {
246+
while (true) {
248247
Connection *conn = nullptr;
249248
Status error =
250249
acceptor_gdb->Accept(/*children_inherit_accept_socket=*/false, conn);
@@ -576,18 +575,6 @@ int main_platform(int argc, char *argv[]) {
576575
client_handle(platform, inferior_arguments);
577576
} while (g_server);
578577

579-
// FIXME: Make TCPSocket::CloseListenSockets() public and implement
580-
// Acceptor::Close().
581-
/*
582-
if (acceptor_gdb && gdb_thread.IsJoinable()) {
583-
g_listen_gdb = false;
584-
static_cast<TCPSocket *>(acceptor_gdb->m_listener_socket_up.get())
585-
->CloseListenSockets();
586-
lldb::thread_result_t result;
587-
gdb_thread.Join(&result);
588-
}
589-
*/
590-
591578
fprintf(stderr, "lldb-server exiting...\n");
592579

593580
return 0;

0 commit comments

Comments
 (0)