Support Unit Testing debugserver

Summary:
This patch refactors the CMake build system's support for building debugserver to allow us to build the majority of debugserver's sources into the debugserverCommon library which can then be reused by unit tests.

The first unit test I've written tests debug server's ability to accept incoming connections from LLDB. The test forks the process, and one side creates a listening socket using debugserver's socket API, the other side creates a transmitting socket using LLDB's TCPSocket class.

I have no clue where to even start getting this connected into the LLDB Xcode project, so for now these tests are CMake-only.

Reviewers: zturner, labath, jasonmolenda

Subscribers: lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D31357

llvm-svn: 300111
diff --git a/lldb/unittests/debugserver/debugserver_LogCallback.cpp b/lldb/unittests/debugserver/debugserver_LogCallback.cpp
new file mode 100644
index 0000000..7a724b4
--- /dev/null
+++ b/lldb/unittests/debugserver/debugserver_LogCallback.cpp
@@ -0,0 +1,20 @@
+//===-- debugserver_LogCallback.cpp -----------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+//------------------------------------------------------------------------------
+// this function is defined in debugserver.cpp, but is needed to link the
+// debugserver Common library. It is for logging only, so it is left
+// unimplemented here.
+//------------------------------------------------------------------------------
+
+#include <stdint.h>
+#include <stdarg.h>
+
+void FileLogCallback(void *baton, uint32_t flags, const char *format,
+                     va_list args) {}