[Lldb-commits] [lldb] 300bbbc - [ProcessGDBRemote] Get rid of an unused function.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 29 12:39:17 PDT 2020


Author: Davide Italiano
Date: 2020-06-29T12:39:09-07:00
New Revision: 300bbbcb707ad08200543735326982664136d3bc

URL: https://github.com/llvm/llvm-project/commit/300bbbcb707ad08200543735326982664136d3bc
DIFF: https://github.com/llvm/llvm-project/commit/300bbbcb707ad08200543735326982664136d3bc.diff

LOG: [ProcessGDBRemote] Get rid of an unused function.

The define was wrong. I could've fixed it, but given this is
unused I decided to drop the function altogether.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 39e97c92e343..ff263fa16258 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -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;


        


More information about the lldb-commits mailing list