GDB is a powerful debugger. Without a doubt, we can debug multi-threaded programs with gdb. In particular, we can switch between threads, inspect the stack, and dump the registers. In this post, I would like to start with the Dining Philosophers Problem, which was first coined by Edsger Dijkstra.
Here …