Is there a way to continue until the loop finishes in lldb? I'm looking for an analogue to finish
but instead of jumping out of the stack frame, it jumps out of the loop.
for (int i = 0; i < 10000000; i++) {
...
//say I'm here
}
//and I want to go here.
The debugger doesn't have enough information to recognize loops or other similar flow control concepts. They aren't reflected in the debug information, and the debugger doesn't know how to compile source in exactly the way it was originally built (including getting all the #defines right and mirroring the code generation peculiarities of the version of the compiler you actually used) which it would need to do to map from source text to instructions faithfully.
So it doesn't have any way to handle this sort of operation for you.
You can do this by hand. One way is to set a temporary breakpoint and run there. For instance if the "I want to go here" statement was line 25, you can say:
(lldb) break set -o 1 -l 25
(lldb) c
Another short cut is to do:
(lldb) thread until 25
thread until
has the advantage over setting a temporary breakpoint and continuing that it also puts a backstop on the current function's return, so if you missed the fact that the loop did a return (or - shivers - a goto...) somewhere we'll stop when the function exits rather than just continuing.