[Lldb-commits] [lldb] r251170 - Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to fix MSVC builds failures.

Eugene Zelenko via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 23 18:28:06 PDT 2015


Author: eugenezelenko
Date: Fri Oct 23 20:28:05 2015
New Revision: 251170

URL: http://llvm.org/viewvc/llvm-project?rev=251170&view=rev
Log:
Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to fix MSVC builds failures.

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

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=251170&r1=251169&r2=251170&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Oct 23 20:28:05 2015
@@ -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 @@ namespace lldb
         if (error.Success())
             ((ProcessGDBRemote *)p)->GetGDBRemote().DumpHistory (strm);
     }
-} // namespace lldb
+}
 
 namespace {
 
@@ -120,6 +119,7 @@ namespace {
     class PluginProperties : public Properties
     {
     public:
+        
         static ConstString
         GetSettingName ()
         {
@@ -132,9 +132,12 @@ namespace {
             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 @@ namespace {
         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 @@ public:
             m_name = name;
             m_has[e_has_name] = true;
         }
-
         bool get_name (std::string & out) const
         {
             out = m_name;
@@ -208,7 +212,6 @@ public:
             m_base = base;
             m_has[e_has_base] = true;
         }
-
         bool get_base (lldb::addr_t & out) const
         {
             out = m_base;
@@ -219,7 +222,6 @@ public:
         {
             m_base_is_offset = is_offset;
         }
-
         bool get_base_is_offset(bool & out) const
         {
             out = m_base_is_offset;
@@ -231,7 +233,6 @@ public:
             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 @@ public:
             m_dynamic = addr;
             m_has[e_has_dynamic] = true;
         }
-
         bool get_dynamic (lldb::addr_t & out) const
         {
             out = m_dynamic;
@@ -257,6 +257,7 @@ public:
         }
 
     protected:
+
         bool m_has[e_num];
         std::string m_name;
         lldb::addr_t m_link_map;
@@ -332,6 +333,7 @@ ProcessGDBRemote::Terminate()
     PluginManager::UnregisterPlugin (ProcessGDBRemote::CreateInstance);
 }
 
+
 lldb::ProcessSP
 ProcessGDBRemote::CreateInstance (lldb::TargetSP target_sp, Listener &listener, const FileSpec *crash_file_path)
 {
@@ -374,6 +376,9 @@ ProcessGDBRemote::CanDebug (lldb::Target
     return true;
 }
 
+//----------------------------------------------------------------------
+// ProcessGDBRemote constructor
+//----------------------------------------------------------------------
 ProcessGDBRemote::ProcessGDBRemote(lldb::TargetSP target_sp, Listener &listener) :
     Process (target_sp, listener),
     m_flags (0),
@@ -428,6 +433,9 @@ ProcessGDBRemote::ProcessGDBRemote(lldb:
         m_gdb_comm.SetPacketTimeout(timeout_seconds);
 }
 
+//----------------------------------------------------------------------
+// Destructor
+//----------------------------------------------------------------------
 ProcessGDBRemote::~ProcessGDBRemote()
 {
     //  m_mach_process.UnregisterNotificationCallbacks (this);
@@ -555,6 +563,7 @@ SplitCommaSeparatedRegisterNumberString(
     return regnums.size();
 }
 
+
 void
 ProcessGDBRemote::BuildDynamicRegisterInfo (bool force)
 {
@@ -1147,8 +1156,10 @@ ProcessGDBRemote::DoLaunch (Module *exe_
                                         exe_module->GetArchitecture().GetArchitectureName());
     }
     return error;
+
 }
 
+
 Error
 ProcessGDBRemote::ConnectToDebugserver (const char *connect_url)
 {
@@ -1195,6 +1206,7 @@ ProcessGDBRemote::ConnectToDebugserver (
         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 @@ ProcessGDBRemote::DidAttach (ArchSpec &p
     DidLaunchOrAttach (process_arch);
 }
 
+
 Error
 ProcessGDBRemote::WillResume ()
 {
@@ -1914,6 +1927,7 @@ ProcessGDBRemote::UpdateThreadList (Thre
     return true;
 }
 
+
 bool
 ProcessGDBRemote::GetThreadStopInfoFromJSON (ThreadGDBRemote *thread, const StructuredData::ObjectSP &thread_infos_sp)
 {
@@ -1971,6 +1985,7 @@ ProcessGDBRemote::CalculateThreadStopInf
     return false;
 }
 
+
 ThreadSP
 ProcessGDBRemote::SetThreadStopInfo (lldb::tid_t tid,
                                      ExpeditedRegisterMap &expedited_register_map,
@@ -2344,6 +2359,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
                     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 @@ ProcessGDBRemote::RefreshStateAfterStop
     // 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 @@ ProcessGDBRemote::DoDetach(bool keep_sto
     return error;
 }
 
+
 Error
 ProcessGDBRemote::DoDestroy ()
 {
@@ -3154,6 +3172,7 @@ Error
 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 @@ ProcessGDBRemote::GetMemoryRegionInfo (a
 Error
 ProcessGDBRemote::GetWatchpointSupportInfo (uint32_t &num)
 {
+    
     Error error (m_gdb_comm.GetWatchpointSupportInfo (num));
     return error;
 }
@@ -3207,6 +3227,7 @@ ProcessGDBRemote::DoDeallocateMemory (ll
     return error;
 }
 
+
 //------------------------------------------------------------------
 // Process STDIO
 //------------------------------------------------------------------
@@ -4009,6 +4030,7 @@ ProcessGDBRemote::NewThreadNotifyBreakpo
     return false;
 }
 
+
 bool
 ProcessGDBRemote::StartNoticingNewThreads()
 {
@@ -4176,6 +4198,7 @@ ProcessGDBRemote::GetLoadedDynamicLibrar
     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 @@ ParseRegisters (XMLNode feature_node, Gd
     return true;
 }
     
-} // anonymous namespace
+} // namespace {}
 
 
 // query the target of gdb-remote for extended target information
@@ -4499,6 +4522,7 @@ ProcessGDBRemote::GetGDBServerRegisterIn
     {
         return false;
     }
+    
 
     XMLDocument xml_document;
 
@@ -4866,6 +4890,7 @@ ProcessGDBRemote::GetFileLoadAddress(con
     return Error("Unknown error happened during sending the load address packet");
 }
 
+
 void
 ProcessGDBRemote::ModulesDidLoad (ModuleList &module_list)
 {
@@ -4877,6 +4902,7 @@ ProcessGDBRemote::ModulesDidLoad (Module
     m_gdb_comm.ServeSymbolLookups(this);
 }
 
+
 class CommandObjectProcessGDBRemoteSpeedTest: public CommandObjectParsed
 {
 public:
@@ -4898,7 +4924,10 @@ public:
         m_option_group.Finalize();
     }
 
-    ~CommandObjectProcessGDBRemoteSpeedTest() override = default;
+    ~CommandObjectProcessGDBRemoteSpeedTest ()
+    {
+    }
+
 
     Options *
     GetOptions () override
@@ -4939,17 +4968,19 @@ public:
         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 @@ public:
                          NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketHistory() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketHistory ()
+    {
+    }
+    
     bool
     DoExecute (Args& command, CommandReturnObject &result) override
     {
@@ -4986,6 +5019,8 @@ public:
 
 class CommandObjectProcessGDBRemotePacketXferSize : public CommandObjectParsed
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketXferSize(CommandInterpreter &interpreter) :
     CommandObjectParsed (interpreter,
@@ -4994,9 +5029,11 @@ public:
                          NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketXferSize() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketXferSize ()
+    {
+    }
+    
     bool
     DoExecute (Args& command, CommandReturnObject &result) override
     {
@@ -5026,8 +5063,11 @@ public:
     }
 };
 
+
 class CommandObjectProcessGDBRemotePacketSend : public CommandObjectParsed
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketSend(CommandInterpreter &interpreter) :
         CommandObjectParsed (interpreter,
@@ -5037,9 +5077,11 @@ public:
                              NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketSend() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketSend ()
+    {
+    }
+    
     bool
     DoExecute (Args& command, CommandReturnObject &result) override
     {
@@ -5082,6 +5124,8 @@ public:
 
 class CommandObjectProcessGDBRemotePacketMonitor : public CommandObjectRaw
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacketMonitor(CommandInterpreter &interpreter) :
         CommandObjectRaw (interpreter,
@@ -5091,9 +5135,11 @@ public:
                          NULL)
     {
     }
-
-    ~CommandObjectProcessGDBRemotePacketMonitor() override = default;
-
+    
+    ~CommandObjectProcessGDBRemotePacketMonitor ()
+    {
+    }
+    
     bool
     DoExecute (const char *command, CommandReturnObject &result) override
     {
@@ -5131,6 +5177,8 @@ public:
 
 class CommandObjectProcessGDBRemotePacket : public CommandObjectMultiword
 {
+private:
+    
 public:
     CommandObjectProcessGDBRemotePacket(CommandInterpreter &interpreter) :
         CommandObjectMultiword (interpreter,
@@ -5144,8 +5192,10 @@ public:
         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 @@ public:
         LoadSubCommand ("packet", CommandObjectSP (new CommandObjectProcessGDBRemotePacket    (interpreter)));
     }
 
-    ~CommandObjectMultiwordProcessGDBRemote() override = default;
+    ~CommandObjectMultiwordProcessGDBRemote ()
+    {
+    }
 };
 
 CommandObject *




More information about the lldb-commits mailing list