Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to fix MSVC builds failures.

llvm-svn: 251170
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index cea0589..8ed7e45 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 // C Includes
 #include <errno.h>
 #include <stdlib.h>
@@ -23,9 +25,6 @@
 #include <map>
 #include <mutex>
 
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Host/Config.h"
 #include "lldb/Breakpoint/Watchpoint.h"
 #include "lldb/Interpreter/Args.h"
 #include "lldb/Core/ArchSpec.h"
@@ -66,6 +65,7 @@
 #include "lldb/Target/SystemRuntime.h"
 #include "lldb/Utility/PseudoTerminal.h"
 
+// Project includes
 #include "lldb/Host/Host.h"
 #include "Plugins/Process/Utility/GDBRemoteSignals.h"
 #include "Plugins/Process/Utility/InferiorCallPOSIX.h"
@@ -78,7 +78,6 @@
 #include "ThreadGDBRemote.h"
 
 #define DEBUGSERVER_BASENAME    "debugserver"
-
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
@@ -99,7 +98,7 @@
         if (error.Success())
             ((ProcessGDBRemote *)p)->GetGDBRemote().DumpHistory (strm);
     }
-} // namespace lldb
+}
 
 namespace {
 
@@ -120,6 +119,7 @@
     class PluginProperties : public Properties
     {
     public:
+        
         static ConstString
         GetSettingName ()
         {
@@ -132,9 +132,12 @@
             m_collection_sp.reset (new OptionValueProperties(GetSettingName()));
             m_collection_sp->Initialize(g_properties);
         }
-
-        ~PluginProperties() override = default;
-
+        
+        virtual
+        ~PluginProperties()
+        {
+        }
+        
         uint64_t
         GetPacketTimeout()
         {
@@ -168,14 +171,16 @@
         return g_settings_sp;
     }
     
-} // anonymous namespace
+} // anonymous namespace end
 
 class ProcessGDBRemote::GDBLoadedModuleInfoList
 {
 public:
+
     class LoadedModuleInfo
     {
     public:
+
         enum e_data_point
         {
             e_has_name      = 0,
@@ -196,7 +201,6 @@
             m_name = name;
             m_has[e_has_name] = true;
         }
-
         bool get_name (std::string & out) const
         {
             out = m_name;
@@ -208,7 +212,6 @@
             m_base = base;
             m_has[e_has_base] = true;
         }
-
         bool get_base (lldb::addr_t & out) const
         {
             out = m_base;
@@ -219,7 +222,6 @@
         {
             m_base_is_offset = is_offset;
         }
-
         bool get_base_is_offset(bool & out) const
         {
             out = m_base_is_offset;
@@ -231,7 +233,6 @@
             m_link_map = addr;
             m_has[e_has_link_map] = true;
         }
-
         bool get_link_map (lldb::addr_t & out) const
         {
             out = m_link_map;
@@ -243,7 +244,6 @@
             m_dynamic = addr;
             m_has[e_has_dynamic] = true;
         }
-
         bool get_dynamic (lldb::addr_t & out) const
         {
             out = m_dynamic;
@@ -257,6 +257,7 @@
         }
 
     protected:
+
         bool m_has[e_num];
         std::string m_name;
         lldb::addr_t m_link_map;
@@ -332,6 +333,7 @@
     PluginManager::UnregisterPlugin (ProcessGDBRemote::CreateInstance);
 }
 
+
 lldb::ProcessSP
 ProcessGDBRemote::CreateInstance (lldb::TargetSP target_sp, Listener &listener, const FileSpec *crash_file_path)
 {
@@ -374,6 +376,9 @@
     return true;
 }
 
+//----------------------------------------------------------------------
+// ProcessGDBRemote constructor
+//----------------------------------------------------------------------
 ProcessGDBRemote::ProcessGDBRemote(lldb::TargetSP target_sp, Listener &listener) :
     Process (target_sp, listener),
     m_flags (0),
@@ -428,6 +433,9 @@
         m_gdb_comm.SetPacketTimeout(timeout_seconds);
 }
 
+//----------------------------------------------------------------------
+// Destructor
+//----------------------------------------------------------------------
 ProcessGDBRemote::~ProcessGDBRemote()
 {
     //  m_mach_process.UnregisterNotificationCallbacks (this);
@@ -555,6 +563,7 @@
     return regnums.size();
 }
 
+
 void
 ProcessGDBRemote::BuildDynamicRegisterInfo (bool force)
 {
@@ -1147,8 +1156,10 @@
                                         exe_module->GetArchitecture().GetArchitectureName());
     }
     return error;
+
 }
 
+
 Error
 ProcessGDBRemote::ConnectToDebugserver (const char *connect_url)
 {
@@ -1195,6 +1206,7 @@
         return error;
     }
 
+
     // Start the communications read thread so all incoming data can be
     // parsed into packets and queued as they arrive.
     if (GetTarget().GetNonStopModeEnabled())
@@ -1462,6 +1474,7 @@
     DidLaunchOrAttach (process_arch);
 }
 
+
 Error
 ProcessGDBRemote::WillResume ()
 {
@@ -1914,6 +1927,7 @@
     return true;
 }
 
+
 bool
 ProcessGDBRemote::GetThreadStopInfoFromJSON (ThreadGDBRemote *thread, const StructuredData::ObjectSP &thread_infos_sp)
 {
@@ -1971,6 +1985,7 @@
     return false;
 }
 
+
 ThreadSP
 ProcessGDBRemote::SetThreadStopInfo (lldb::tid_t tid,
                                      ExpeditedRegisterMap &expedited_register_map,
@@ -2344,6 +2359,7 @@
                     return true; // Keep iterating through all array items
                 });
             }
+
         }
         else if (key == g_key_signal)
             signo = object->GetIntegerValue(LLDB_INVALID_SIGNAL_NUMBER);
@@ -2664,6 +2680,7 @@
     // Let all threads recover from stopping and do any clean up based
     // on the previous thread state (if any).
     m_thread_list_real.RefreshStateAfterStop();
+    
 }
 
 Error
@@ -2725,6 +2742,7 @@
     return error;
 }
 
+
 Error
 ProcessGDBRemote::DoDestroy ()
 {
@@ -3154,6 +3172,7 @@
 ProcessGDBRemote::GetMemoryRegionInfo (addr_t load_addr, 
                                        MemoryRegionInfo &region_info)
 {
+    
     Error error (m_gdb_comm.GetMemoryRegionInfo (load_addr, region_info));
     return error;
 }
@@ -3161,6 +3180,7 @@
 Error
 ProcessGDBRemote::GetWatchpointSupportInfo (uint32_t &num)
 {
+    
     Error error (m_gdb_comm.GetWatchpointSupportInfo (num));
     return error;
 }
@@ -3207,6 +3227,7 @@
     return error;
 }
 
+
 //------------------------------------------------------------------
 // Process STDIO
 //------------------------------------------------------------------
@@ -4009,6 +4030,7 @@
     return false;
 }
 
+
 bool
 ProcessGDBRemote::StartNoticingNewThreads()
 {
@@ -4176,6 +4198,7 @@
     return object_sp;
 }
 
+
 // Establish the largest memory read/write payloads we should use.
 // If the remote stub has a max packet size, stay under that size.
 // 
@@ -4468,7 +4491,7 @@
     return true;
 }
     
-} // anonymous namespace
+} // namespace {}
 
 
 // query the target of gdb-remote for extended target information
@@ -4499,6 +4522,7 @@
     {
         return false;
     }
+    
 
     XMLDocument xml_document;
 
@@ -4866,6 +4890,7 @@
     return Error("Unknown error happened during sending the load address packet");
 }
 
+
 void
 ProcessGDBRemote::ModulesDidLoad (ModuleList &module_list)
 {
@@ -4877,6 +4902,7 @@
     m_gdb_comm.ServeSymbolLookups(this);
 }
 
+
 class CommandObjectProcessGDBRemoteSpeedTest: public CommandObjectParsed
 {
 public:
@@ -4898,7 +4924,10 @@
         m_option_group.Finalize();
     }
 
-    ~CommandObjectProcessGDBRemoteSpeedTest() override = default;
+    ~CommandObjectProcessGDBRemoteSpeedTest ()
+    {
+    }
+
 
     Options *
     GetOptions () override
@@ -4939,17 +4968,19 @@
         result.SetStatus (eReturnStatusFailed);
         return false;
     }
-
 protected:
     OptionGroupOptions m_option_group;
     OptionGroupUInt64 m_num_packets;
     OptionGroupUInt64 m_max_send;
     OptionGroupUInt64 m_max_recv;
     OptionGroupBoolean m_json;
+
 };
 
 class CommandObjectProcessGDBRemotePacketHistory : public CommandObjectParsed
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketHistory(CommandInterpreter &interpreter) :
     CommandObjectParsed (interpreter,
@@ -4958,9 +4989,11 @@
                          NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketHistory() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketHistory ()
+    {
+    }
+    
     bool
     DoExecute (Args& command, CommandReturnObject &result) override
     {
@@ -4986,6 +5019,8 @@
 
 class CommandObjectProcessGDBRemotePacketXferSize : public CommandObjectParsed
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketXferSize(CommandInterpreter &interpreter) :
     CommandObjectParsed (interpreter,
@@ -4994,9 +5029,11 @@
                          NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketXferSize() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketXferSize ()
+    {
+    }
+    
     bool
     DoExecute (Args& command, CommandReturnObject &result) override
     {
@@ -5026,8 +5063,11 @@
     }
 };
 
+
 class CommandObjectProcessGDBRemotePacketSend : public CommandObjectParsed
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketSend(CommandInterpreter &interpreter) :
         CommandObjectParsed (interpreter,
@@ -5037,9 +5077,11 @@
                              NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketSend() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketSend ()
+    {
+    }
+    
     bool
     DoExecute (Args& command, CommandReturnObject &result) override
     {
@@ -5082,6 +5124,8 @@
 
 class CommandObjectProcessGDBRemotePacketMonitor : public CommandObjectRaw
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketMonitor(CommandInterpreter &interpreter) :
         CommandObjectRaw (interpreter,
@@ -5091,9 +5135,11 @@
                          NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketMonitor() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketMonitor ()
+    {
+    }
+    
     bool
     DoExecute (const char *command, CommandReturnObject &result) override
     {
@@ -5131,6 +5177,8 @@
 
 class CommandObjectProcessGDBRemotePacket : public CommandObjectMultiword
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacket(CommandInterpreter &interpreter) :
         CommandObjectMultiword (interpreter,
@@ -5144,8 +5192,10 @@
         LoadSubCommand ("xfer-size", CommandObjectSP (new CommandObjectProcessGDBRemotePacketXferSize (interpreter)));
         LoadSubCommand ("speed-test", CommandObjectSP (new CommandObjectProcessGDBRemoteSpeedTest (interpreter)));
     }
-
-    ~CommandObjectProcessGDBRemotePacket() override = default;
+    
+    ~CommandObjectProcessGDBRemotePacket ()
+    {
+    }    
 };
 
 class CommandObjectMultiwordProcessGDBRemote : public CommandObjectMultiword
@@ -5160,7 +5210,9 @@
         LoadSubCommand ("packet", CommandObjectSP (new CommandObjectProcessGDBRemotePacket    (interpreter)));
     }
 
-    ~CommandObjectMultiwordProcessGDBRemote() override = default;
+    ~CommandObjectMultiwordProcessGDBRemote ()
+    {
+    }
 };
 
 CommandObject *