Friday, April 24, 2009

Book Reviews, November 2008

By Prof. John E. Savage, Brown University, Providence, RI, USA, November 2008

This book provides an excellent treatment of debugging techniques in C/C++ and is must-read for all serious software engineers. It contains practical advice and introduces a wide variety of debugging methods, ranging from the simple to the sophisticated. The book will prove valuable to the novice and the expert programmer alike. The illustrations and examples will be particularly useful to the new programmer for whom debugging is often ignored to their detriment later on. The expert will find the many specialized debugging tools and techniques interesting and useful. This is the rare book that will appeal to both audiences.


By Prof. Laurent Michel, University of Connecticut, Storrs, CT, USA, November 2008

This book is unique in many respects. First, there is no other book I know of that covers the topic of program debugging even though I found myself educating countless engineers on how to properly and methodically debug programs. Up to now, this knowledge is passed down "in the field" from experienced software writers to their younger colleagues. Second, it is quite comprehensive and covers a pleasantly broad set of topics ranging from the type of bugs and their origin to memory debugging, parallel program debugging, runtime monitoring, link-time related bugs or even profiling. Third, the book can be enjoyed cover to cover with gems (astute way to use debugging tools) that will surprise every software programmers save, perhaps, the most seasoned veteran. Students will find the book equally pleasant as it remains truly accessible and should be read by every person who intends to major in software engineering. Debuggers are wonderful tools, yet extremely rich. It can take years to discover/develop debugging methods. The book will help all newcomers to zero in on the critical tools and methods. The material is made extremely relevant with a substantial amount of efforts devoted to the discussion of specific concrete tools (e.g., gdb, valgrind, gprof, quantify, dmalloc, etc..). The focus is unmistakably on UNIX related tools (albeit with a clear effort to show the equivalent tools in a Microsoft setting).

As a brief summary, the book start in chapters 1 through 3 by discussing the nature and source of bugs, which classes of bugs exist (from benign to mid and severe) and finally how to get started with the simplest form of debugging: tracing and inspecting. Chapters 4 through 6 focus on memory related issues, i.e., they focus on memory leaks, memory corruption, memory protocol violations (e.g., double delete) as well as memory performance profiling and improvements. Chapter 7 briefly touches on debugging parallel code (a truly difficult task). Chapter 8 and 9 focus on problem related to the build/link/run process and environment. The last three chapters cover more advanced topics for sophisticated instrumentation/observation techniques (e.g., conditional breakpoints, watch points, signaling, dealing with statics, dump analysis and runtime changes to the state).

Naturally, it is quite difficult to cover every single aspects and tools related to the debugging process so some tools are not covered in the book. The sole omission that is noteworthy is the DTrace tools (created at SUN and available on both Solaris and Apple Mac OS X) which offers an amazing array of instrumentation tools. This does not however diminish the value of the text that I will highly recommend to my own students. A second edition will surely address this omission.

All in all, this is an excellent text that will please many developers who will most certainly find themselves referring back to it again and again. Highly recommended.