http://www.spinellis.gr/pubs/Breview/2010-CR-Debug/html/review.html
This is an HTML rendering of a working paper draft that led to a publication. The publication should always be cited in preference to this draft using the following reference:
  • Diomidis Spinellis. Book review: The art of debugging with GDB, DDD, and Eclipse. ACM Computing Reviews, 51(3), March 2010. Green Open Access

The document's metadata is available in BibTeX format.

Find the publication on Google Scholar

This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author's copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.

Diomidis Spinellis Publications


Copyright © 2010 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org.

Book Review: The Art of Debugging with GDB, DDD, and Eclipse

Diomidis Spinellis
Athens University of Economics and Business

Matloff N., Salzman P.
The Art of Debugging with GDB, DDD, and Eclipse
No Starch Press, San Francisco, CA, 2008.
280 pp.

Together with programming, debugging is a skill we develop through experience. However, while we can become better programmers by studying algorithms, data structures, implementation patterns, style guides, application programming interfaces (APIs), and even existing open-source code, there are few resources we can tap into to improve our debugging abilities. Matloff and Salzman’s book fills this gap by presenting three powerful debugging tools, background knowledge, and essential techniques.

The three tools discussed in the book span the whole range of tool support for debugging. GDB is a command-line based tool that is difficult to master, but can be extremely powerful. DDD provides a graphical user interface (GUI) front end to GDB; thus, DDD is a reasonable compromise between power and usability. Eclipse, as a full-featured integrated development environment (IDE), provides additional facilities that cover more software development activities.

The book starts with a discussion of debugging techniques, an overview of the tools, a comparison of their distinct interfaces, and a sample of a debugging session performed on each of them. This allows readers to decide which tool is most appropriate for them.

The book’s main part covers in detail the facilities typically used for debugging programs: breakpoints, watchpoints, variable inspection, and examining a failed program’s memory image (core dump). Each topic includes both simple and detailed examples that cover GDB, DDD, and Eclipse. The text then moves on to more advanced topics, including: the debugging of threaded code, parallel applications, GUI programs, and debugger-specific quirks. Where required, the authors present the theory behind a particular behavior, such as a memory protection fault.

Somewhat paradoxically for a book with a title that focuses on three specific tools, the text also covers other important debugging tools: text editor, compiler, C’s error reporting, strace, ltrace, splint, and electric fence. I would have liked to see valgrind and dtrace included in the presentation. The book ends with a discussion of how DDD, GDB, and Eclipse can be used to debug code written in Java, Perl, Python, SWIG, and assembly.

C programmers working on Unix systems will benefit the most from reading this book, but many others will learn valuable techniques and tricks.