jeffreytan81 wrote:

@jimingham, thanks for the comment.

When I try to add a new testcase for stepping over a function with a user set 
breakpoint, there is a bug found -- the user set breakpoint did not stop with 
`ThreadPlanSingleThreadTimeout` present (which is `c` case in your RFC comment)

I did some investigation, when we issue normal step-over, the all thread plans 
in the stack return false for `PlanExplainsStop`, so base thread plan got a 
chance to check thread's stop info and stop the execution. 

However, while doing single thread stepping, `ThreadPlanSingleThreadTimeout` as 
leaf plan always return true for `PlanExplainsStop`, causing the logic to use 
the second while loop in `Thread::ShouldStop()`, eventually, 
`ThreadPlanStepOut::MischiefManaged()` returns false causing the loop to 
terminate early without giving base thread plan to decide should stop or not:
https://github.com/llvm/llvm-project/blob/393eff4e02e7ab3d234d246a8d6912c8e745e6f9/lldb/source/Target/Thread.cpp#L905-L907

So overall the `Thread::ShouldStop()` returns false and ignores the hit inner 
breakpoint during stepping. Any suggestion how to fix this? 



https://github.com/llvm/llvm-project/pull/90930
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to