I have a program which uses two threads. I have put the break point in both the threads. While running the program under gdb I want to switch between the threads and make th
use break conditions
(gdb) break frik.c:13 thread 28 if bartab > lim
see Debugging with GDB
Edit:
(gdb) break thread 2 (gdb) break thread 1 (gdb) thread 1 (gdb) continue (gdb) ... thread 1 finishes (gdb) thread 2 (gdb) continue
You can put these commands inside a .gdbrc file.