lldb arm64 import.

These changes were written by Greg Clayton, Jim Ingham, Jason Molenda.

It builds cleanly against TOT llvm with xcodebuild.  I updated the
cmake files by visual inspection but did not try a build.  I haven't
built these sources on any non-Mac platforms - I don't think this
patch adds any code that requires darwin, but please let me know if
I missed something.

In debugserver, MachProcess.cpp and MachTask.cpp were renamed to
MachProcess.mm and MachTask.mm as they picked up some new Objective-C
code needed to launch processes when running on iOS.

llvm-svn: 205113
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index 4e404b6..8de845f 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -159,6 +159,10 @@
 
     int
     SendLaunchArchPacket (const char *arch);
+    
+    int
+    SendLaunchEventDataPacket (const char *data, bool *was_supported = NULL);
+    
     //------------------------------------------------------------------
     /// Sends a "vAttach:PID" where PID is in hex. 
     ///
@@ -494,7 +498,16 @@
     
     bool
     RestoreRegisterState (lldb::tid_t tid, uint32_t save_id);
+
+    const char *
+    GetGDBServerProgramName();
     
+    uint32_t
+    GetGDBServerProgramVersion();
+
+    bool
+    AvoidGPackets(ProcessGDBRemote *process);
+
 protected:
 
     PacketResult
@@ -505,6 +518,9 @@
     bool
     GetCurrentProcessInfo ();
 
+    bool
+    GetGDBServerVersion();
+
     //------------------------------------------------------------------
     // Classes that inherit from GDBRemoteCommunicationClient can see and modify these
     //------------------------------------------------------------------
@@ -519,6 +535,7 @@
     lldb_private::LazyBool m_supports_vCont_S;
     lldb_private::LazyBool m_qHostInfo_is_valid;
     lldb_private::LazyBool m_qProcessInfo_is_valid;
+    lldb_private::LazyBool m_qGDBServerVersion_is_valid;
     lldb_private::LazyBool m_supports_alloc_dealloc_memory;
     lldb_private::LazyBool m_supports_memory_region_info;
     lldb_private::LazyBool m_supports_watchpoint_support_info;
@@ -527,6 +544,7 @@
     lldb_private::LazyBool m_attach_or_wait_reply;
     lldb_private::LazyBool m_prepare_for_reg_writing_reply;
     lldb_private::LazyBool m_supports_p;
+    lldb_private::LazyBool m_avoid_g_packets;
     lldb_private::LazyBool m_supports_QSaveRegisterState;
     lldb_private::LazyBool m_supports_qXfer_auxv_read;
     lldb_private::LazyBool m_supports_qXfer_libraries_read;
@@ -574,6 +592,8 @@
     std::string m_os_build;
     std::string m_os_kernel;
     std::string m_hostname;
+    std::string m_gdb_server_name; // from reply to qGDBServerVersion, empty if qGDBServerVersion is not supported
+    uint32_t m_gdb_server_version; // from reply to qGDBServerVersion, zero if qGDBServerVersion is not supported
     uint32_t m_default_packet_timeout;
     uint64_t m_max_packet_size;  // as returned by qSupported