[Lldb-commits] [lldb] r232952 - Remove virtual and add override to all virtual functions in Process/gdb-remote.

Tamas Berghammer tberghammer at google.com
Mon Mar 23 08:50:03 PDT 2015


Author: tberghammer
Date: Mon Mar 23 10:50:03 2015
New Revision: 232952

URL: http://llvm.org/viewvc/llvm-project?rev=232952&view=rev
Log:
Remove virtual and add override to all virtual functions in Process/gdb-remote.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h?rev=232952&r1=232951&r2=232952&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Mon Mar 23 10:50:03 2015
@@ -77,7 +77,7 @@ public:
                                           StringExtractorGDBRemote &response);
 
     bool
-    GetThreadSuffixSupported ();
+    GetThreadSuffixSupported () override;
 
     // This packet is usually sent first and the boolean return value
     // indicates if the packet was send and any response was received

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h?rev=232952&r1=232951&r2=232952&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h Mon Mar 23 10:50:03 2015
@@ -35,7 +35,7 @@ public:
     virtual
     ~GDBRemoteCommunicationServerCommon();
 
-    virtual bool
+    bool
     GetThreadSuffixSupported () override
     {
         return true;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h?rev=232952&r1=232951&r2=232952&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h Mon Mar 23 10:50:03 2015
@@ -64,41 +64,41 @@ public:
     //------------------------------------------------------------------
     // Subclasses must override these functions
     //------------------------------------------------------------------
-    virtual void
-    InvalidateAllRegisters ();
+    void
+    InvalidateAllRegisters () override;
 
-    virtual size_t
-    GetRegisterCount ();
+    size_t
+    GetRegisterCount () override;
 
-    virtual const lldb_private::RegisterInfo *
-    GetRegisterInfoAtIndex (size_t reg);
+    const lldb_private::RegisterInfo *
+    GetRegisterInfoAtIndex (size_t reg) override;
 
-    virtual size_t
-    GetRegisterSetCount ();
+    size_t
+    GetRegisterSetCount () override;
 
-    virtual const lldb_private::RegisterSet *
-    GetRegisterSet (size_t reg_set);
+    const lldb_private::RegisterSet *
+    GetRegisterSet (size_t reg_set) override;
 
-    virtual bool
-    ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
+    bool
+    ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override;
 
-    virtual bool
-    WriteRegister (const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
+    bool
+    WriteRegister (const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override;
     
-    virtual bool
-    ReadAllRegisterValues (lldb::DataBufferSP &data_sp);
+    bool
+    ReadAllRegisterValues (lldb::DataBufferSP &data_sp) override;
 
-    virtual bool
-    WriteAllRegisterValues (const lldb::DataBufferSP &data_sp);
+    bool
+    WriteAllRegisterValues (const lldb::DataBufferSP &data_sp) override;
 
-    virtual bool
-    ReadAllRegisterValues (lldb_private::RegisterCheckpoint &reg_checkpoint);
+    bool
+    ReadAllRegisterValues (lldb_private::RegisterCheckpoint &reg_checkpoint) override;
 
-    virtual bool
-    WriteAllRegisterValues (const lldb_private::RegisterCheckpoint &reg_checkpoint);
+    bool
+    WriteAllRegisterValues (const lldb_private::RegisterCheckpoint &reg_checkpoint) override;
 
-    virtual uint32_t
-    ConvertRegisterKindToRegisterNumber (lldb::RegisterKind kind, uint32_t num);
+    uint32_t
+    ConvertRegisterKindToRegisterNumber (lldb::RegisterKind kind, uint32_t num) override;
 
 protected:
     friend class ThreadGDBRemote;

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=232952&r1=232951&r2=232952&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Mar 23 10:50:03 2015
@@ -3416,7 +3416,7 @@ public:
     }
     
     bool
-    DoExecute (Args& command, CommandReturnObject &result)
+    DoExecute (Args& command, CommandReturnObject &result) override
     {
         const size_t argc = command.GetArgumentCount();
         if (argc == 0)
@@ -3456,7 +3456,7 @@ public:
     }
     
     bool
-    DoExecute (Args& command, CommandReturnObject &result)
+    DoExecute (Args& command, CommandReturnObject &result) override
     {
         const size_t argc = command.GetArgumentCount();
         if (argc == 0)
@@ -3504,7 +3504,7 @@ public:
     }
     
     bool
-    DoExecute (Args& command, CommandReturnObject &result)
+    DoExecute (Args& command, CommandReturnObject &result) override
     {
         const size_t argc = command.GetArgumentCount();
         if (argc == 0)
@@ -3562,7 +3562,7 @@ public:
     }
     
     bool
-    DoExecute (const char *command, CommandReturnObject &result)
+    DoExecute (const char *command, CommandReturnObject &result) override
     {
         if (command == NULL || command[0] == '\0')
         {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h?rev=232952&r1=232951&r2=232952&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Mon Mar 23 10:50:03 2015
@@ -73,149 +73,149 @@ public:
     //------------------------------------------------------------------
     // Check if a given Process
     //------------------------------------------------------------------
-    virtual bool
+    bool
     CanDebug (lldb_private::Target &target,
               bool plugin_specified_by_name) override;
 
-    virtual lldb_private::CommandObject *
+    lldb_private::CommandObject *
     GetPluginCommandObject() override;
 
     //------------------------------------------------------------------
     // Creating a new process, or attaching to an existing one
     //------------------------------------------------------------------
-    virtual lldb_private::Error
+    lldb_private::Error
     WillLaunch (lldb_private::Module* module) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoLaunch (lldb_private::Module *exe_module, 
               lldb_private::ProcessLaunchInfo &launch_info) override;
 
-    virtual void
+    void
     DidLaunch () override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     WillAttachToProcessWithID (lldb::pid_t pid) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     WillAttachToProcessWithName (const char *process_name, bool wait_for_launch) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoConnectRemote (lldb_private::Stream *strm, const char *remote_url) override;
     
     lldb_private::Error
     WillLaunchOrAttach ();
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoAttachToProcessWithID (lldb::pid_t pid) override;
     
-    virtual lldb_private::Error
+    lldb_private::Error
     DoAttachToProcessWithID (lldb::pid_t pid, const lldb_private::ProcessAttachInfo &attach_info) override;
     
-    virtual lldb_private::Error
+    lldb_private::Error
     DoAttachToProcessWithName (const char *process_name,
                                const lldb_private::ProcessAttachInfo &attach_info) override;
 
-    virtual void
+    void
     DidAttach (lldb_private::ArchSpec &process_arch) override;
 
     //------------------------------------------------------------------
     // PluginInterface protocol
     //------------------------------------------------------------------
-    virtual lldb_private::ConstString
+    lldb_private::ConstString
     GetPluginName() override;
 
-    virtual uint32_t
+    uint32_t
     GetPluginVersion() override;
 
     //------------------------------------------------------------------
     // Process Control
     //------------------------------------------------------------------
-    virtual lldb_private::Error
+    lldb_private::Error
     WillResume () override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoResume () override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoHalt (bool &caused_stop) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoDetach (bool keep_stopped) override;
     
-    virtual bool
+    bool
     DetachRequiresHalt() override { return true; }
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoSignal (int signal) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DoDestroy () override;
 
-    virtual void
+    void
     RefreshStateAfterStop() override;
 
     //------------------------------------------------------------------
     // Process Queries
     //------------------------------------------------------------------
-    virtual bool
+    bool
     IsAlive () override;
 
-    virtual lldb::addr_t
+    lldb::addr_t
     GetImageInfoAddress() override;
 
     //------------------------------------------------------------------
     // Process Memory
     //------------------------------------------------------------------
-    virtual size_t
+    size_t
     DoReadMemory (lldb::addr_t addr, void *buf, size_t size, lldb_private::Error &error) override;
 
-    virtual size_t
+    size_t
     DoWriteMemory (lldb::addr_t addr, const void *buf, size_t size, lldb_private::Error &error) override;
 
-    virtual lldb::addr_t
+    lldb::addr_t
     DoAllocateMemory (size_t size, uint32_t permissions, lldb_private::Error &error) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     GetMemoryRegionInfo (lldb::addr_t load_addr, 
                          lldb_private::MemoryRegionInfo &region_info) override;
     
-    virtual lldb_private::Error
+    lldb_private::Error
     DoDeallocateMemory (lldb::addr_t ptr) override;
 
     //------------------------------------------------------------------
     // Process STDIO
     //------------------------------------------------------------------
-    virtual size_t
+    size_t
     PutSTDIN (const char *buf, size_t buf_size, lldb_private::Error &error) override;
 
     //----------------------------------------------------------------------
     // Process Breakpoints
     //----------------------------------------------------------------------
-    virtual lldb_private::Error
+    lldb_private::Error
     EnableBreakpointSite (lldb_private::BreakpointSite *bp_site) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DisableBreakpointSite (lldb_private::BreakpointSite *bp_site) override;
 
     //----------------------------------------------------------------------
     // Process Watchpoints
     //----------------------------------------------------------------------
-    virtual lldb_private::Error
+    lldb_private::Error
     EnableWatchpoint (lldb_private::Watchpoint *wp, bool notify = true) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     DisableWatchpoint (lldb_private::Watchpoint *wp, bool notify = true) override;
 
-    virtual lldb_private::Error
+    lldb_private::Error
     GetWatchpointSupportInfo (uint32_t &num) override;
     
-    virtual lldb_private::Error
+    lldb_private::Error
     GetWatchpointSupportInfo (uint32_t &num, bool& after) override;
     
-    virtual bool
+    bool
     StartNoticingNewThreads() override;
 
-    virtual bool
+    bool
     StopNoticingNewThreads() override;
 
     GDBRemoteCommunicationClient &
@@ -224,13 +224,13 @@ public:
         return m_gdb_comm;
     }
     
-    virtual lldb_private::Error
+    lldb_private::Error
     SendEventData(const char *data) override;
 
     //----------------------------------------------------------------------
     // Override SetExitStatus so we can disconnect from the remote GDB server
     //----------------------------------------------------------------------
-    virtual bool
+    bool
     SetExitStatus (int exit_status, const char *cstr) override;
 
     void
@@ -285,7 +285,7 @@ protected:
         return m_flags;
     }
 
-    virtual bool
+    bool
     UpdateThreadList (lldb_private::ThreadList &old_thread_list, 
                       lldb_private::ThreadList &new_thread_list) override;
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h?rev=232952&r1=232951&r2=232952&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h Mon Mar 23 10:50:03 2015
@@ -27,32 +27,32 @@ public:
     virtual
     ~ThreadGDBRemote ();
 
-    virtual void
-    WillResume (lldb::StateType resume_state);
+    void
+    WillResume (lldb::StateType resume_state) override;
 
-    virtual void
-    RefreshStateAfterStop();
+    void
+    RefreshStateAfterStop() override;
 
-    virtual const char *
-    GetName ();
+    const char *
+    GetName () override;
 
-    virtual const char *
-    GetQueueName ();
+    const char *
+    GetQueueName () override;
 
-    virtual lldb::queue_id_t
-    GetQueueID ();
+    lldb::queue_id_t
+    GetQueueID () override;
 
-    virtual lldb::QueueSP
-    GetQueue ();
+    lldb::QueueSP
+    GetQueue () override;
 
     lldb::addr_t
-    GetQueueLibdispatchQueueAddress ();
+    GetQueueLibdispatchQueueAddress () override;
 
-    virtual lldb::RegisterContextSP
-    GetRegisterContext ();
+    lldb::RegisterContextSP
+    GetRegisterContext () override;
 
-    virtual lldb::RegisterContextSP
-    CreateRegisterContextForFrame (lldb_private::StackFrame *frame);
+    lldb::RegisterContextSP
+    CreateRegisterContextForFrame (lldb_private::StackFrame *frame) override;
 
     void
     Dump (lldb_private::Log *log, uint32_t index);
@@ -67,7 +67,7 @@ public:
     GetBasicInfoAsString ();
 
     void
-    SetName (const char *name)
+    SetName (const char *name) override
     {
         if (name && name[0])
             m_thread_name.assign (name);
@@ -88,7 +88,7 @@ public:
     }
 
     lldb_private::StructuredData::ObjectSP
-    FetchThreadExtendedInfo ();
+    FetchThreadExtendedInfo () override;
 
 protected:
     
@@ -111,8 +111,8 @@ protected:
     void
     SetStopInfoFromPacket (StringExtractor &stop_packet, uint32_t stop_id);
 
-    virtual bool
-    CalculateStopInfo ();
+    bool
+    CalculateStopInfo () override;
 
 
 };





More information about the lldb-commits mailing list