[Lldb-commits] [lldb] r139667 - /lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp

Johnny Chen johnny.chen at apple.com
Tue Sep 13 16:43:18 PDT 2011


Author: johnny
Date: Tue Sep 13 18:43:18 2011
New Revision: 139667

URL: http://llvm.org/viewvc/llvm-project?rev=139667&view=rev
Log:
Update I386 DNB impl to fix the same errors as DNBArchImplX86_64: ('==' instead of '=') and (by value instead of by reference).

Modified:
    lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp

Modified: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp?rev=139667&r1=139666&r2=139667&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp Tue Sep 13 18:43:18 2011
@@ -552,7 +552,7 @@
     if (kret != KERN_SUCCESS)
         return;
 
-    DBG debug_state = m_state.context.dbg;
+    DBG &debug_state = m_state.context.dbg;
     bool need_reset = false;
     uint32_t i, num = NumSupportedHardwareWatchpoints();
     for (i = 0; i < num; ++i)
@@ -722,13 +722,13 @@
     uint32_t addr_32 = addr & 0xffffffff;
     switch (hw_index) {
     case 0:
-        debug_state.__dr0 == addr_32; break;
+        debug_state.__dr0 = addr_32; break;
     case 1:
-        debug_state.__dr1 == addr_32; break;
+        debug_state.__dr1 = addr_32; break;
     case 2:
-        debug_state.__dr2 == addr_32; break;
+        debug_state.__dr2 = addr_32; break;
     case 3:
-        debug_state.__dr3 == addr_32; break;
+        debug_state.__dr3 = addr_32; break;
     default:
         assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3");
     }
@@ -741,13 +741,13 @@
     debug_state.__dr7 &= ~(3 << (2*hw_index));
     switch (hw_index) {
     case 0:
-        debug_state.__dr0 == 0; break;
+        debug_state.__dr0 = 0; break;
     case 1:
-        debug_state.__dr1 == 0; break;
+        debug_state.__dr1 = 0; break;
     case 2:
-        debug_state.__dr2 == 0; break;
+        debug_state.__dr2 = 0; break;
     case 3:
-        debug_state.__dr3 == 0; break;
+        debug_state.__dr3 = 0; break;
     default:
         assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3");
     }
@@ -831,7 +831,7 @@
         // Check to make sure we have the needed hardware support
         uint32_t i = 0;
 
-        DBG debug_state = m_state.context.dbg;
+        DBG &debug_state = m_state.context.dbg;
         for (i = 0; i < num_hw_watchpoints; ++i)
         {
             if (IsWatchpointVacant(debug_state, i))
@@ -866,7 +866,7 @@
     const uint32_t num_hw_points = NumSupportedHardwareWatchpoints();
     if (kret == KERN_SUCCESS)
     {
-        DBG debug_state = m_state.context.dbg;
+        DBG &debug_state = m_state.context.dbg;
         if (hw_index < num_hw_points && !IsWatchpointVacant(debug_state, hw_index))
         {
             // Modify our local copy of the debug state, first.
@@ -892,7 +892,7 @@
     DNBLogThreadedIf(LOG_WATCHPOINTS, "DNBArchImplI386::GetHardwareWatchpointHit() GetDBGState() => 0x%8.8x.", kret);
     if (kret == KERN_SUCCESS)
     {
-        DBG debug_state = m_state.context.dbg;
+        DBG &debug_state = m_state.context.dbg;
         uint32_t i, num = NumSupportedHardwareWatchpoints();
         for (i = 0; i < num; ++i)
         {





More information about the lldb-commits mailing list