Let’s say I’m debugging a multithreaded program with GDB.
I stopped on a breakpoint in one thread; thread I enter
next 3 (or
step 3 or smth similar); at this time the other thread hits a breakpoint, GDB switches to that one (
scheduler-locking is off).
Is it guaranteed that the 1st thread did not run more than 3 lines at the time of the 2nd breakpoint stop?
Is it impossible that the 1st thread runs 2 lines, GDB switches to the 2nd one, then the 1st one runs 1000 more lines, then GDB stop on a breakpoint (in the 2nd thread)?
I’m not sure I can devise this from the docs.