[Lldb-commits] [lldb] 08d6cf2 - [lldb] Fix comments referring to BCR_M_IMVA_MATCH

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Sun Jan 15 23:39:28 PST 2023


Author: Saagar Jha
Date: 2023-01-15T23:39:22-08:00
New Revision: 08d6cf232c0e4ca8ebafc3e2b9eb488f014f5b41

URL: https://github.com/llvm/llvm-project/commit/08d6cf232c0e4ca8ebafc3e2b9eb488f014f5b41
DIFF: https://github.com/llvm/llvm-project/commit/08d6cf232c0e4ca8ebafc3e2b9eb488f014f5b41.diff

LOG: [lldb] Fix comments referring to BCR_M_IMVA_MATCH

It seems like these were copied from the single-step code and not
updated to match the new flags.

Differential revision: https://reviews.llvm.org/D141816

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
    lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
index 8891512fc0b3..b29d44176c94 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
@@ -1491,7 +1491,7 @@ uint32_t RegisterContextDarwin_arm::SetHardwareBreakpoint(lldb::addr_t addr,
 
         // We have a thumb breakpoint
         // We have an ARM breakpoint
-        dbg.bcr[i] = BCR_M_IMVA_MATCH | // Stop on address mismatch
+        dbg.bcr[i] = BCR_M_IMVA_MATCH | // Stop on address match
                      byte_addr_select | // Set the correct byte address select
                                         // so we only trigger on the correct
                                         // opcode
@@ -1510,7 +1510,7 @@ uint32_t RegisterContextDarwin_arm::SetHardwareBreakpoint(lldb::addr_t addr,
       } else if (size == 4) {
         // We have an ARM breakpoint
         dbg.bcr[i] =
-            BCR_M_IMVA_MATCH | // Stop on address mismatch
+            BCR_M_IMVA_MATCH | // Stop on address match
             BAS_IMVA_ALL | // Stop on any of the four bytes following the IMVA
             S_USER |       // Which modes should this breakpoint stop in?
             BCR_ENABLE;    // Enable this hardware breakpoint

diff  --git a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
index 0748223c4217..92717f1c5754 100644
--- a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
@@ -1011,7 +1011,7 @@ uint32_t DNBArchMachARM::EnableHardwareBreakpoint(nub_addr_t addr,
         // We have a thumb breakpoint
         // We have an ARM breakpoint
         m_state.dbg.__bcr[i] =
-            BCR_M_IMVA_MATCH | // Stop on address mismatch
+            BCR_M_IMVA_MATCH | // Stop on address match
             byte_addr_select | // Set the correct byte address select so we only
                                // trigger on the correct opcode
             S_USER |           // Which modes should this breakpoint stop in?
@@ -1025,7 +1025,7 @@ uint32_t DNBArchMachARM::EnableHardwareBreakpoint(nub_addr_t addr,
       } else if (size == 4) {
         // We have an ARM breakpoint
         m_state.dbg.__bcr[i] =
-            BCR_M_IMVA_MATCH | // Stop on address mismatch
+            BCR_M_IMVA_MATCH | // Stop on address match
             BAS_IMVA_ALL | // Stop on any of the four bytes following the IMVA
             S_USER |       // Which modes should this breakpoint stop in?
             BCR_ENABLE;    // Enable this hardware breakpoint


        


More information about the lldb-commits mailing list