[ProcessGDBRemote] Get rid of an unused function.
authorDavide Italiano <ditaliano@apple.com>
Mon, 29 Jun 2020 19:38:27 +0000 (12:38 -0700)
committerDavide Italiano <ditaliano@apple.com>
Mon, 29 Jun 2020 19:39:09 +0000 (12:39 -0700)
The define was wrong. I could've fixed it, but given this is
unused I decided to drop the function altogether.

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

index 39e97c9..ff263fa 100644 (file)
@@ -189,21 +189,6 @@ static const ProcessKDPPropertiesSP &GetGlobalPluginProperties() {
 #define HIGH_PORT (49151u)
 #endif
 
-#if defined(__APPLE__) &&                                                      \
-    (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
-static bool rand_initialized = false;
-
-static inline uint16_t get_random_port() {
-  if (!rand_initialized) {
-    time_t seed = time(NULL);
-
-    rand_initialized = true;
-    srand(seed);
-  }
-  return (rand() % (HIGH_PORT - LOW_PORT)) + LOW_PORT;
-}
-#endif
-
 ConstString ProcessGDBRemote::GetPluginNameStatic() {
   static ConstString g_name("gdb-remote");
   return g_name;