O'Reilly logo

Effective Debugging: 66 Specific Ways to Debug Software and Systems by Diomidis Spinellis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8. Debugging Multi-threaded Code

CPU manufacturers package the constantly increasing number of transistors they can fit onto a chip into multiple cores, and then ask us developers to put the cores to good use. Threads of execution running on the multiple cores avoid coordinating with each other so that each one can run as fast as possible. Consequently, the programs execute in a nondeterministic manner: every time we run them, they may execute in a slightly different order. This throws out the window many of the techniques you saw in other chapters of this book. For example, you can’t reliably zoom in to a moving target (see Item 4: “Drill Up from the Problem to the Bug or Down from the Program’s Start to the Bug”). Thankfully, there are tools ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required