[Lldb-commits] [lldb] r335711 - Add missing constness.

Tatyana Krasnukha via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 27 00:01:07 PDT 2018


Author: tkrasnukha
Date: Wed Jun 27 00:01:07 2018
New Revision: 335711

URL: http://llvm.org/viewvc/llvm-project?rev=335711&view=rev
Log:
Add missing constness.

Modified:
    lldb/trunk/include/lldb/Core/Architecture.h
    lldb/trunk/include/lldb/Target/Target.h
    lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
    lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp
    lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.h
    lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h
    lldb/trunk/source/Target/Thread.cpp
    lldb/trunk/source/Target/ThreadPlanStepInRange.cpp

Modified: lldb/trunk/include/lldb/Core/Architecture.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Architecture.h?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Architecture.h (original)
+++ lldb/trunk/include/lldb/Core/Architecture.h Wed Jun 27 00:01:07 2018
@@ -31,7 +31,7 @@ public:
   /// stopped at the current PC. The code is generic and applies to all
   /// ARM CPUs.
   //------------------------------------------------------------------
-  virtual void OverrideStopInfo(Thread &thread) = 0;
+  virtual void OverrideStopInfo(Thread &thread) const = 0;
 
   //------------------------------------------------------------------
   /// This method is used to get the number of bytes that should be

Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Wed Jun 27 00:01:07 2018
@@ -938,7 +938,7 @@ public:
 
   bool MergeArchitecture(const ArchSpec &arch_spec);
 
-  Architecture *GetArchitecturePlugin() { return m_arch.GetPlugin(); }
+  Architecture *GetArchitecturePlugin() const { return m_arch.GetPlugin(); }
 
   Debugger &GetDebugger() { return m_debugger; }
 

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Wed Jun 27 00:01:07 2018
@@ -367,7 +367,7 @@ BreakpointResolverName::SearchCallback(S
             if (prologue_byte_size)
               break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
             else {
-              Architecture *arch =
+              const Architecture *arch =
                   m_breakpoint->GetTarget().GetArchitecturePlugin();
               if (arch)
                 arch->AdjustBreakpointAddress(*sc.symbol, break_addr);

Modified: lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp (original)
+++ lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp Wed Jun 27 00:01:07 2018
@@ -41,7 +41,7 @@ std::unique_ptr<Architecture> Architectu
 ConstString ArchitectureArm::GetPluginName() { return GetPluginNameStatic(); }
 uint32_t ArchitectureArm::GetPluginVersion() { return 1; }
 
-void ArchitectureArm::OverrideStopInfo(Thread &thread) {
+void ArchitectureArm::OverrideStopInfo(Thread &thread) const {
   // We need to check if we are stopped in Thumb mode in a IT instruction and
   // detect if the condition doesn't pass. If this is the case it means we
   // won't actually execute this instruction. If this happens we need to clear

Modified: lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.h?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.h (original)
+++ lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.h Wed Jun 27 00:01:07 2018
@@ -23,7 +23,7 @@ public:
   ConstString GetPluginName() override;
   uint32_t GetPluginVersion() override;
 
-  void OverrideStopInfo(Thread &thread) override;
+  void OverrideStopInfo(Thread &thread) const override;
 
 private:
   static std::unique_ptr<Architecture> Create(const ArchSpec &arch);

Modified: lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h (original)
+++ lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h Wed Jun 27 00:01:07 2018
@@ -23,7 +23,7 @@ public:
   ConstString GetPluginName() override;
   uint32_t GetPluginVersion() override;
 
-  void OverrideStopInfo(Thread &thread) override {}
+  void OverrideStopInfo(Thread &thread) const override {}
 
   //------------------------------------------------------------------
   /// This method compares current address with current function's

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Wed Jun 27 00:01:07 2018
@@ -439,7 +439,7 @@ lldb::StopInfoSP Thread::GetPrivateStopI
     if (m_stop_info_override_stop_id != process_stop_id) {
       m_stop_info_override_stop_id = process_stop_id;
       if (m_stop_info_sp) {
-        if (Architecture *arch =
+        if (const Architecture *arch =
                 process_sp->GetTarget().GetArchitecturePlugin())
           arch->OverrideStopInfo(*this);
       }

Modified: lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepInRange.cpp?rev=335711&r1=335710&r2=335711&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepInRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepInRange.cpp Wed Jun 27 00:01:07 2018
@@ -272,7 +272,7 @@ bool ThreadPlanStepInRange::ShouldStop(E
 
         if (bytes_to_skip == 0 && sc.symbol) {
           TargetSP target = m_thread.CalculateTarget();
-          Architecture *arch = target->GetArchitecturePlugin();
+          const Architecture *arch = target->GetArchitecturePlugin();
           if (arch) {
             Address curr_sec_addr;
             target->GetSectionLoadList().ResolveLoadAddress(curr_addr,




More information about the lldb-commits mailing list