Author: jingham
Date: Wed Feb  3 13:45:31 2016
New Revision: 259684

URL: http://llvm.org/viewvc/llvm-project?rev=259684&view=rev
Log:
The SetStopInfo from a Mach Exception was setting the stop
reason to None when we stop due to a trace, then noticed that
we were on a breakpoint that was not valid for the current thread.
That should actually have set it back to trace.

This was pr26441 (<rdar://problem/24470203>)

Modified:
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
    lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
    lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py?rev=259684&r1=259683&r2=259684&view=diff
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
 Wed Feb  3 13:45:31 2016
@@ -79,7 +79,6 @@ class ConsecutiveBreakpointsTestCase(Tes
         self.finish_test()
 
     @no_debug_info_test
-    @expectedFailureDarwin(bugnumber="llvm.org/pr26441")
     def test_single_step_thread_specific(self):
         """Test that single step stops, even though the second breakpoint is 
not valid."""
         self.prepare_test()

Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp?rev=259684&r1=259683&r2=259684&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp 
(original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Wed Feb 
 3 13:45:31 2016
@@ -507,6 +507,8 @@ StopInfoMachException::CreateStopReasonW
                         // report the breakpoint regardless of the thread.
                         if (bp_site_sp->ValidForThisThread (&thread) || 
thread.GetProcess()->GetOperatingSystem () != NULL)
                             return 
StopInfo::CreateStopReasonWithBreakpointSiteID (thread, bp_site_sp->GetID());
+                        else if (is_trace_if_actual_breakpoint_missing)
+                            return StopInfo::CreateStopReasonToTrace (thread);
                         else
                             return StopInfoSP();
                     }

Modified: lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp?rev=259684&r1=259683&r2=259684&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp Wed Feb  3 13:45:31 
2016
@@ -239,7 +239,8 @@ ThreadPlanStepInstruction::ShouldStop (E
     }
     else
     {
-        if (m_thread.GetRegisterContext()->GetPC(0) != m_instruction_addr)
+        lldb::addr_t pc_addr = m_thread.GetRegisterContext()->GetPC(0);
+        if (pc_addr != m_instruction_addr)
         {
             if (--m_iteration_count <= 0)
             {


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to