[lldb-dev] What is ThreadPlan used for?

Yao Qi qiyaoltc at gmail.com
Sun Jan 5 04:54:11 PST 2014


Hi,
I am not a lldb hacker, but I'd like to give some cents from a general
debugger's point of view.

On 01/04/2014 09:49 PM, æšć‹‡ć‹‡ wrote:
> Then the problem occurs, no matter I execute "step" or "continue", lldb
> always sends "vCont;s:xxxx"
> 
> I debugged a little and found that plan stack holds at most top a
> ThreadPlanStepOverBreakpoint object ever since I resumed from "main"
> where a breakpoint is set. And worse, this ThreadPlanStepOverBreakpoint
> object is never poped out even it is performed.

Program stops at main because the process hits the breakpoint.  The
original instruction replaced by breakpoint hasn't been executed.
When "step" or "continue" is typed, debugger has to remove breakpoint
temporarily, execute the instruction, and place breakpoint back again.
This process is called breakpoint step over.  After that, debugger
can resume the process and wait for the new event.

Looks like lldb thinks step over is not finished.  Probably you should
check the stop reply to "vCont;s", to see where process stopped.  On
some targets, PC is the address of the breakpoint, while on other
targets, PC is the address of the instruction after breakpoint.  Your
debugger and remote stub should have a consensus.

Hope it is helpful.




More information about the lldb-dev mailing list