Index: source/Interpreter/CommandInterpreter.cpp =================================================================== --- source/Interpreter/CommandInterpreter.cpp +++ source/Interpreter/CommandInterpreter.cpp @@ -624,18 +624,21 @@ } } - std::unique_ptr - connect_gdb_remote_cmd_ap(new CommandObjectRegexCommand (*this, - "gdb-remote", - "Connect to a remote GDB server. If no hostname is provided, localhost is assumed.", - "gdb-remote [:]", - 2, - 0, - false)); + std::unique_ptr connect_gdb_remote_cmd_ap( + new CommandObjectRegexCommand(*this, "gdb-remote", "Connect to a remote GDB server. If no " + "hostname is provided, localhost is assumed.", + "gdb-remote [:] [reverse]", 2, 0, false)); if (connect_gdb_remote_cmd_ap.get()) { - if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", "process connect --plugin gdb-remote connect://%1") && - connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", "process connect --plugin gdb-remote connect://localhost:%1")) + if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", + "process connect --plugin gdb-remote connect://%1") && + connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", + "process connect --plugin gdb-remote connect://localhost:%1") && + connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+) reverse$", + "process connect --plugin gdb-remote listen://%1") && + connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+) reverse$", + "process connect --plugin gdb-remote " + "listen://localhost:%1")) { CommandObjectSP command_sp(connect_gdb_remote_cmd_ap.release()); m_command_dict[command_sp->GetCommandName ()] = command_sp;