Can't just call "rand" to get a random port, 'cause then you'll get the same sequence in two lldb's.  This makes running lldb on lldb not work very well.  

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128493 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 49f9aa6..b434853 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -54,9 +54,16 @@
 using namespace lldb;
 using namespace lldb_private;
 
+static bool rand_initialized = false;
+
 static inline uint16_t
 get_random_port ()
 {
+    if (!rand_initialized)
+    {
+        rand_initialized = true;
+        sranddev();
+    }
     return (rand() % (UINT16_MAX - 1000u)) + 1000u;
 }