[lldb] Fix comments referring to BCR_M_IMVA_MATCH
authorSaagar Jha <saagar@saagarjha.com>
Mon, 16 Jan 2023 07:38:41 +0000 (23:38 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 16 Jan 2023 07:39:22 +0000 (23:39 -0800)
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

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

index 8891512..b29d441 100644 (file)
@@ -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
index 0748223..92717f1 100644 (file)
@@ -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