[lldb-dev] Continue misfiring after expression evaluation

Kaylor, Andrew andrew.kaylor at intel.com
Wed Dec 5 15:28:18 PST 2012

Hi all,

I've been debugging a problem on Linux where if you hit a breakpoint, then evaluate an expression that requires JITing, then continue LLDB will break at the line you were already on.  I don't know if this problem is specific to Linux, but that's where I'm debugging it.  This problem appears in the 'lang/c/setvalues/TestSetValues.py' test case, but can also be reproduced manually.

What I'm seeing is that when the 'continue' handling calls Thread::SetupForResume() the current Thread reports its stop reason as 'eStopReasonPlanComplete' because the ThreadPlan for evaluating the expression is still on the completed plans stack.  As a result, the ThreadPlanStepOverBreakpoint plan doesn't get queued.  If I add calls to 'm_completed_plan_stack.clear()' and 'm_discarded_plan_stack.clear()' at the top of the 'if (GetResumeState() == eStateSuspended)' block in Thread::SetupForResume() then everything works as expected.

Obviously, that feels like a pretty risky thing to do, at best.  It seems like the expression command handling should have done something to clear the completed plan stack when it was finished, but as of yet I haven't found a place where that is appropriate.

Can anyone give me guidance on this issue?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121205/0711717d/attachment.html>

More information about the lldb-dev mailing list