[Lldb-commits] [lldb] r301559 - Update GDB remote command regex for IPv6

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 27 09:13:58 PDT 2017


Author: cbieneman
Date: Thu Apr 27 11:13:58 2017
New Revision: 301559

URL: http://llvm.org/viewvc/llvm-project?rev=301559&view=rev
Log:
Update GDB remote command regex for IPv6

This updates the regular expression used to match host/port pairs for the gdb-remote command to also match IPv6 addresses.

The IPv6 address matcher is very generic and does not really check for structural validity of the address. It turns out that IPv6 addresses are very complicated.

Modified:
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=301559&r1=301558&r2=301559&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Thu Apr 27 11:13:58 2017
@@ -645,8 +645,8 @@ void CommandInterpreter::LoadCommandDict
           "gdb-remote [<hostname>:]<portnum>", 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") &&
+            "^([^:]+|\\[[0-9a-fA-F:]+.*\\]):([0-9]+)$",
+            "process connect --plugin gdb-remote connect://%1:%2") &&
         connect_gdb_remote_cmd_ap->AddRegexCommand(
             "^([[:digit:]]+)$",
             "process connect --plugin gdb-remote connect://localhost:%1")) {




More information about the lldb-commits mailing list