How to step in one thread and stick in this thread among many threads?


I am wondering if there is a command that can let me

Stick in one thread of many threads to do step or next?

How step, next, si, ni behave in thread debugging?



Currently as long all steps might end up running the other threads.

For example if you do a step over you might end up running just the current thread until you step into a function call, and then a breakpoint will be set on the return address and all threads will be continued.

So there is no guarantee other threads won't run when stepping in/out/over.

This is similar to how GDB does it.

Jim Ingham will be able to clarify more.


The help for the step commands say (e.g.):

(lldb) help thread step-in
   Source level single step in specified thread (current thread, if none specified).

Syntax: thread step-in <cmd-options> [<thread-id>]

Is there anything else you need?


Hi Jim

Thank you. I will try this command to see if it works for me.


Note that all the “normal” thread stepping commands like “step”, “next”, etc are just aliases for the thread equivalents:

(lldb) help next
'next' is an abbreviation for 'thread step-over'

So these are all the commands you are used to using.