Index: lldb/tools/lldb-server/lldb-platform.cpp =================================================================== --- lldb/tools/lldb-server/lldb-platform.cpp +++ lldb/tools/lldb-server/lldb-platform.cpp @@ -241,11 +241,11 @@ return -1; // Make a port map for a port range that was specified. - if (min_gdbserver_port < max_gdbserver_port) { + if (min_gdbserver_port && min_gdbserver_port < max_gdbserver_port) { for (uint16_t port = min_gdbserver_port; port < max_gdbserver_port; ++port) gdbserver_portmap[port] = LLDB_INVALID_PROCESS_ID; - } else if (min_gdbserver_port != max_gdbserver_port) { - fprintf(stderr, "error: --min-gdbserver-port (%u) is greater than " + } else if (min_gdbserver_port || max_gdbserver_port) { + fprintf(stderr, "error: --min-gdbserver-port (%u) is not lower than " "--max-gdbserver-port (%u)\n", min_gdbserver_port, max_gdbserver_port); option_error = 3;