[Lldb-commits] [lldb] r295168 - Bug 30863 - Step doesn't stop with conditional breakpoint on the next line

2017-02-15 Thread Boris Ulasevich via lldb-commits
Author: bulasevich
Date: Wed Feb 15 05:42:47 2017
New Revision: 295168

URL: http://llvm.org/viewvc/llvm-project?rev=295168&view=rev
Log:
Bug 30863 - Step doesn't stop with conditional breakpoint on the next line
Differential Revisions:
  https://reviews.llvm.org/D26497 (committed r290168, temporary reverted 
r290197)
  https://reviews.llvm.org/D28945 (fix for Ubuntu tests fail)
  https://reviews.llvm.org/D29909 (fix for TestCallThatThrows test fail)

Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/main.cpp
Modified:
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp

Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=295168&r1=295167&r2=295168&view=diff
==
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Wed Feb 15 05:42:47 2017
@@ -126,6 +126,7 @@ public:
// bit of data.
 lldb::StopInfoSP stop_info_sp; // You have to restore the stop info or you
// might continue with the wrong signals.
+std::vector m_completed_plan_stack;
 lldb::RegisterCheckpointSP
 register_backup_sp; // You need to restore the registers, of course...
 uint32_t current_inlined_depth;
@@ -1029,6 +1030,15 @@ public:
   bool WasThreadPlanDiscarded(ThreadPlan *plan);
 
   //--
+  /// Check if we have completed plan to override breakpoint stop reason
+  ///
+  /// @return
+  /// Returns true if completed plan stack is not empty
+  /// false otherwise.
+  //--
+  bool CompletedPlanOverridesBreakpoint();
+   
+  //--
   /// Queues a generic thread plan.
   ///
   /// @param[in] plan_sp
@@ -1213,6 +1223,8 @@ public:
 
   void SetStopInfo(const lldb::StopInfoSP &stop_info_sp);
 
+  void ResetStopInfo();
+
   void SetShouldReportStop(Vote vote);
 
   //--

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=295168&r1=295167&r2=295168&view=diff
==
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Wed Feb 15 05:42:47 2017
@@ -40,9 +40,10 @@ namespace lldb_private {
 //  The thread maintaining a thread plan stack, and you program the actions of 
a
 //  particular thread
 //  by pushing plans onto the plan stack.
-//  There is always a "Current" plan, which is the head of the plan stack,
+//  There is always a "Current" plan, which is the top of the plan stack,
 //  though in some cases
-//  a plan may defer to plans higher in the stack for some piece of 
information.
+//  a plan may defer to plans higher in the stack for some piece of information
+//  (let us define that the plan stack grows downwards).
 //
 //  The plan stack is never empty, there is always a Base Plan which persists
 //  through the life
@@ -109,6 +110,15 @@ namespace lldb_private {
 //  plans in the time between when
 //  your plan gets unshipped and the next resume.
 //
+//  Thread State Checkpoint:
+//
+//  Note that calling functions on target process (ThreadPlanCallFunction) 
changes
+//  current thread state. The function can be called either by direct user 
demand or
+//  internally, for example lldb allocates memory on device to calculate 
breakpoint
+//  condition expression - on Linux it is performed by calling mmap on device.
+//  ThreadStateCheckpoint saves Thread state (stop info and completed
+//  plan stack) to restore it after completing function call.
+//
 //  Over the lifetime of the plan, various methods of the ThreadPlan are then
 //  called in response to changes of state in
 //  the process we are debugging as follows:
@@ -149,7 +159,7 @@ namespace lldb_private {
 //  If the Current plan answers "true" then it is asked if the stop should
 //  percolate all the way to the
 //  user by calling the ShouldStop method.  If the curr

[Lldb-commits] [lldb] r293269 - Unroll r292930 due to TestCallThatThrows test fail is not fixed in reasonable time.

2017-01-27 Thread Boris Ulasevich via lldb-commits
Author: bulasevich
Date: Fri Jan 27 01:51:43 2017
New Revision: 293269

URL: http://llvm.org/viewvc/llvm-project?rev=293269&view=rev
Log:
Unroll r292930 due to TestCallThatThrows test fail is not fixed in reasonable 
time.

Removed:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/
Modified:
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp

Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=293269&r1=293268&r2=293269&view=diff
==
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Fri Jan 27 01:51:43 2017
@@ -126,7 +126,6 @@ public:
// bit of data.
 lldb::StopInfoSP stop_info_sp; // You have to restore the stop info or you
// might continue with the wrong signals.
-std::vector m_completed_plan_stack;
 lldb::RegisterCheckpointSP
 register_backup_sp; // You need to restore the registers, of course...
 uint32_t current_inlined_depth;
@@ -1030,15 +1029,6 @@ public:
   bool WasThreadPlanDiscarded(ThreadPlan *plan);
 
   //--
-  /// Check if we have completed plan to override breakpoint stop reason
-  ///
-  /// @return
-  /// Returns true if completed plan stack is not empty
-  /// false otherwise.
-  //--
-  bool CompletedPlanOverridesBreakpoint();
-   
-  //--
   /// Queues a generic thread plan.
   ///
   /// @param[in] plan_sp
@@ -1223,8 +1213,6 @@ public:
 
   void SetStopInfo(const lldb::StopInfoSP &stop_info_sp);
 
-  void ResetStopInfo();
-
   void SetShouldReportStop(Vote vote);
 
   //--

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=293269&r1=293268&r2=293269&view=diff
==
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Fri Jan 27 01:51:43 2017
@@ -40,10 +40,9 @@ namespace lldb_private {
 //  The thread maintaining a thread plan stack, and you program the actions of 
a
 //  particular thread
 //  by pushing plans onto the plan stack.
-//  There is always a "Current" plan, which is the top of the plan stack,
+//  There is always a "Current" plan, which is the head of the plan stack,
 //  though in some cases
-//  a plan may defer to plans higher in the stack for some piece of information
-//  (let us define that the plan stack grows downwards).
+//  a plan may defer to plans higher in the stack for some piece of 
information.
 //
 //  The plan stack is never empty, there is always a Base Plan which persists
 //  through the life
@@ -110,15 +109,6 @@ namespace lldb_private {
 //  plans in the time between when
 //  your plan gets unshipped and the next resume.
 //
-//  Thread State Checkpoint:
-//
-//  Note that calling functions on target process (ThreadPlanCallFunction) 
changes
-//  current thread state. The function can be called either by direct user 
demand or
-//  internally, for example lldb allocates memory on device to calculate 
breakpoint
-//  condition expression - on Linux it is performed by calling mmap on device.
-//  ThreadStateCheckpoint saves Thread state (stop info and completed
-//  plan stack) to restore it after completing function call.
-//
 //  Over the lifetime of the plan, various methods of the ThreadPlan are then
 //  called in response to changes of state in
 //  the process we are debugging as follows:
@@ -159,7 +149,7 @@ namespace lldb_private {
 //  If the Current plan answers "true" then it is asked if the stop should
 //  percolate all the way to the
 //  user by calling the ShouldStop method.  If the current plan doesn't explain
-//  the stop, then we query up
+//  the stop, then we query down
 //  the plan stack for a plan that does explain the stop.  The plan that does
 //  explain the stop then needs to
 //  figure out what to do about the plans below it in the stack.  If the stop 
is
@@ -180,7 +170,7 @@ namespace lldb_private {
 //  event it didn't directly handle
 //  it can designate itself a "Master" plan by responding true to IsMasterPlan,
 //  and then if it wants not to be
-//  discarded, it can return false to OkayToDiscard, and it and all its 
dependent
+//  discarded, it can retur

[Lldb-commits] [lldb] r290168 - Bug 30863 - Step doesn't stop with coditional breakpoint on the next line

2017-01-24 Thread Boris Ulasevich via lldb-commits
Author: bulasevich
Date: Tue Dec 20 02:09:50 2016
New Revision: 290168

URL: http://llvm.org/viewvc/llvm-project?rev=290168&view=rev
Log:
Bug 30863 - Step doesn't stop with coditional breakpoint on the next line
Fixed by additional completed plans detection, and applying them on breakpoint 
condition fail.
Thread::GetStopInfo reworked. New test added.
Review https://reviews.llvm.org/D26497
Many thanks to Jim

Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/main.cpp
Modified:
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp

Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=290168&r1=290167&r2=290168&view=diff
==
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Tue Dec 20 02:09:50 2016
@@ -1029,6 +1029,15 @@ public:
   bool WasThreadPlanDiscarded(ThreadPlan *plan);
 
   //--
+  /// Check if we have completed plan to override breakpoint stop reason
+  ///
+  /// @return
+  /// Returns true if completed plan stack is not empty
+  /// false otherwise.
+  //--
+  bool CompletedPlanOverridesBreakpoint();
+   
+  //--
   /// Queues a generic thread plan.
   ///
   /// @param[in] plan_sp
@@ -1213,6 +1222,8 @@ public:
 
   void SetStopInfo(const lldb::StopInfoSP &stop_info_sp);
 
+  void ResetStopInfo();
+
   void SetShouldReportStop(Vote vote);
 
   //--

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=290168&r1=290167&r2=290168&view=diff
==
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Tue Dec 20 02:09:50 2016
@@ -170,7 +170,7 @@ namespace lldb_private {
 //  event it didn't directly handle
 //  it can designate itself a "Master" plan by responding true to IsMasterPlan,
 //  and then if it wants not to be
-//  discarded, it can return true to OkayToDiscard, and it and all its 
dependent
+//  discarded, it can return false to OkayToDiscard, and it and all its 
dependent
 //  plans will be preserved when
 //  we resume execution.
 //
@@ -207,7 +207,7 @@ namespace lldb_private {
 //
 //  If a plan says responds "true" to ShouldStop, then it is asked if it's job
 //  is complete by calling
-//  MischiefManaged.  If that returns true, the thread is popped from the plan
+//  MischiefManaged.  If that returns true, the plan is popped from the plan
 //  stack and added to the
 //  Completed Plan Stack.  Then the next plan in the stack is asked if it
 //  ShouldStop, and  it returns "true",

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile?rev=290168&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
 Tue Dec 20 02:09:50 2016
@@ -0,0 +1,9 @@
+LEVEL = ../../../make
+
+CXX_SOURCES := main.cpp
+
+ifneq (,$(findstring icc,$(CC)))
+CXXFLAGS += -debug inline-debug-info
+endif
+
+include $(LEVEL)/Makefile.rules

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py?rev=290168&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/func

[Lldb-commits] [lldb] r290197 - Rollback my commit r290168 to fix linux tests failure. I'll be back!

2017-01-24 Thread Boris Ulasevich via lldb-commits
Author: bulasevich
Date: Tue Dec 20 14:00:58 2016
New Revision: 290197

URL: http://llvm.org/viewvc/llvm-project?rev=290197&view=rev
Log:
Rollback my commit r290168 to fix linux tests failure. I'll be back!

Removed:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/
Modified:
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp

Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=290197&r1=290196&r2=290197&view=diff
==
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Tue Dec 20 14:00:58 2016
@@ -1029,15 +1029,6 @@ public:
   bool WasThreadPlanDiscarded(ThreadPlan *plan);
 
   //--
-  /// Check if we have completed plan to override breakpoint stop reason
-  ///
-  /// @return
-  /// Returns true if completed plan stack is not empty
-  /// false otherwise.
-  //--
-  bool CompletedPlanOverridesBreakpoint();
-   
-  //--
   /// Queues a generic thread plan.
   ///
   /// @param[in] plan_sp
@@ -1222,8 +1213,6 @@ public:
 
   void SetStopInfo(const lldb::StopInfoSP &stop_info_sp);
 
-  void ResetStopInfo();
-
   void SetShouldReportStop(Vote vote);
 
   //--

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=290197&r1=290196&r2=290197&view=diff
==
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Tue Dec 20 14:00:58 2016
@@ -170,7 +170,7 @@ namespace lldb_private {
 //  event it didn't directly handle
 //  it can designate itself a "Master" plan by responding true to IsMasterPlan,
 //  and then if it wants not to be
-//  discarded, it can return false to OkayToDiscard, and it and all its 
dependent
+//  discarded, it can return true to OkayToDiscard, and it and all its 
dependent
 //  plans will be preserved when
 //  we resume execution.
 //
@@ -207,7 +207,7 @@ namespace lldb_private {
 //
 //  If a plan says responds "true" to ShouldStop, then it is asked if it's job
 //  is complete by calling
-//  MischiefManaged.  If that returns true, the plan is popped from the plan
+//  MischiefManaged.  If that returns true, the thread is popped from the plan
 //  stack and added to the
 //  Completed Plan Stack.  Then the next plan in the stack is asked if it
 //  ShouldStop, and  it returns "true",

Modified: lldb/trunk/source/Target/StopInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=290197&r1=290196&r2=290197&view=diff
==
--- lldb/trunk/source/Target/StopInfo.cpp (original)
+++ lldb/trunk/source/Target/StopInfo.cpp Tue Dec 20 14:00:58 2016
@@ -269,7 +269,6 @@ protected:
 if (!m_should_perform_action)
   return;
 m_should_perform_action = false;
-bool internal_breakpoint = true;
 
 ThreadSP thread_sp(m_thread_wp.lock());
 
@@ -496,9 +495,6 @@ protected:
 if (callback_says_stop)
   m_should_stop = true;
 
-if (m_should_stop && !bp_loc_sp->GetBreakpoint().IsInternal())
-  internal_breakpoint = false;
-  
 // If we are going to stop for this breakpoint, then remove the
 // breakpoint.
 if (callback_says_stop && bp_loc_sp &&
@@ -530,20 +526,6 @@ protected:
   "Process::%s could not find breakpoint site id: %" PRId64 "...",
   __FUNCTION__, m_value);
   }
-
-  if ((m_should_stop == false || internal_breakpoint)
-  && thread_sp->CompletedPlanOverridesBreakpoint()) {
-
-// Override should_stop decision when we have
-// completed step plan additionally to the breakpoint
-m_should_stop = true;
-
-// Here we clean the preset stop info so the next
-// GetStopInfo call will find the appropriate stop info,
-// which should be the stop info related to the completed plan
-thread_sp->ResetStopInfo();
-  }
-
   if (log)
 log->Printf("Process::%s returning from action with m_should_stop: 
%d.",
 __FUNCTION__, m_should_stop);

Modified: lldb/trunk/source/Target/Thread.cpp

[Lldb-commits] [lldb] r292930 - Bug 30863 - Step doesn't stop with conditional breakpoint on the next line

2017-01-24 Thread Boris Ulasevich via lldb-commits
Author: bulasevich
Date: Tue Jan 24 07:15:19 2017
New Revision: 292930

URL: http://llvm.org/viewvc/llvm-project?rev=292930&view=rev
Log:
Bug 30863 - Step doesn't stop with conditional breakpoint on the next line
Differential Revisions:
  https://reviews.llvm.org/D26497 (committed r290168, temporary reverted 
r290197)
  https://reviews.llvm.org/D28945 (fix for Ubuntu tests fail)

Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/
  - copied from r290180, 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/
Modified:
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp

Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=292930&r1=292929&r2=292930&view=diff
==
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Tue Jan 24 07:15:19 2017
@@ -126,6 +126,7 @@ public:
// bit of data.
 lldb::StopInfoSP stop_info_sp; // You have to restore the stop info or you
// might continue with the wrong signals.
+std::vector m_completed_plan_stack;
 lldb::RegisterCheckpointSP
 register_backup_sp; // You need to restore the registers, of course...
 uint32_t current_inlined_depth;
@@ -1029,6 +1030,15 @@ public:
   bool WasThreadPlanDiscarded(ThreadPlan *plan);
 
   //--
+  /// Check if we have completed plan to override breakpoint stop reason
+  ///
+  /// @return
+  /// Returns true if completed plan stack is not empty
+  /// false otherwise.
+  //--
+  bool CompletedPlanOverridesBreakpoint();
+   
+  //--
   /// Queues a generic thread plan.
   ///
   /// @param[in] plan_sp
@@ -1213,6 +1223,8 @@ public:
 
   void SetStopInfo(const lldb::StopInfoSP &stop_info_sp);
 
+  void ResetStopInfo();
+
   void SetShouldReportStop(Vote vote);
 
   //--

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=292930&r1=292929&r2=292930&view=diff
==
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Tue Jan 24 07:15:19 2017
@@ -40,9 +40,10 @@ namespace lldb_private {
 //  The thread maintaining a thread plan stack, and you program the actions of 
a
 //  particular thread
 //  by pushing plans onto the plan stack.
-//  There is always a "Current" plan, which is the head of the plan stack,
+//  There is always a "Current" plan, which is the top of the plan stack,
 //  though in some cases
-//  a plan may defer to plans higher in the stack for some piece of 
information.
+//  a plan may defer to plans higher in the stack for some piece of information
+//  (let us define that the plan stack grows downwards).
 //
 //  The plan stack is never empty, there is always a Base Plan which persists
 //  through the life
@@ -109,6 +110,15 @@ namespace lldb_private {
 //  plans in the time between when
 //  your plan gets unshipped and the next resume.
 //
+//  Thread State Checkpoint:
+//
+//  Note that calling functions on target process (ThreadPlanCallFunction) 
changes
+//  current thread state. The function can be called either by direct user 
demand or
+//  internally, for example lldb allocates memory on device to calculate 
breakpoint
+//  condition expression - on Linux it is performed by calling mmap on device.
+//  ThreadStateCheckpoint saves Thread state (stop info and completed
+//  plan stack) to restore it after completing function call.
+//
 //  Over the lifetime of the plan, various methods of the ThreadPlan are then
 //  called in response to changes of state in
 //  the process we are debugging as follows:
@@ -149,7 +159,7 @@ namespace lldb_private {
 //  If the Current plan answers "true" then it is asked if the stop should
 //  percolate all the way to the
 //  user by calling the ShouldStop method.  If the current plan doesn't explain
-//  the stop, then we query down
+//  the stop, then we query up
 //  the plan stack for a plan that does explain the stop.  The plan that does
 //  explain the stop then needs to
 //  figure out what to do about the plans below it in the stack.  If the stop 
is
@@ -170,7 +180,7 @@ namespace lld