The Art of Debugging with GDB and DDD
Publisher: No Starch Press
Final Release Date: September 2008
Pages: 280

Debugging is crucial to successful software development, but even many experienced programmers find it challenging. Sophisticated debugging tools are available, yet it may be difficult to determine which features are useful in which situations. The Art of Debugging is your guide to making the debugging process more efficient and effective.

The Art of Debugging illustrates the use three of the most popular debugging tools on Linux/Unix platforms: GDB, DDD, and Eclipse. The text-command based GDB (the GNU Project Debugger) is included with most distributions. DDD is a popular GUI front end for GDB, while Eclipse provides a complete integrated development environment.

In addition to offering specific advice for debugging with each tool, authors Norm Matloff and Pete Salzman cover general strategies for improving the process of finding and fixing coding errors, including how to:

  • Inspect variables and data structures
  • Understand segmentation faults and core dumps
  • Know why your program crashes or throws exceptions
  • Use features like catchpoints, convenience variables, and artificial arrays
  • Avoid common debugging pitfalls

Real world examples of coding errors help to clarify the authors' guiding principles, and coverage of complex topics like thread, client-server, GUI, and parallel programming debugging will make you even more proficient. You'll also learn how to prevent errors in the first place with text editors, compilers, error reporting, and static code checkers.

Whether you dread the thought of debugging your programs or simply want to improve your current debugging efforts, you'll find a valuable ally in The Art of Debugging.

Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillyThe Art of Debugging with GDB and DDD

(based on 1 review)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 1 customer

Displaying review 1

Back to top

(3 of 4 customers found this review helpful)


Informative for GDB Usage

By Roger

from North Pole, AK


  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written


  • Personal Opinions
  • Some Grammar

Best Uses

  • Expert
  • Intermediate
  • Novice
  • Student

Comments about oreilly The Art of Debugging with GDB and DDD:

A Very good read. Teaches users how to use all of the features of GDB.

But there's one thing the author(s) kept saying which troubled me. They severelly kept underrating the usage of printf for debugging with statements such as "it makes code ugly" or "you waste time coding in printf's".

This is not true at all. Matter of fact, I prefer code to be cluttered with printf's as they're usually used with a "-v" command line switch to print verbose debugging. A non-programmer and non-gdb user can use this debug method quite effectively except for segfaults. They then could use strace quite effectively.

As for time wasting coding printf's? Code them once and ifdef them or use them with a -v switch. Whereas GDB, each time you start a new GDB session, you need to retype everything if you haven't saved the settings within a .gdbinit file.

However, for code without any such inline printf's, gdb shines. But again, if the coder didn't use any printf's for debugging, it makes you wonder how good the code is?

But still, GDB looses no value at all, even if everybody uses printf's for debugging.

I've needed GDB many times to troubleshoot segfaults and other bugs.

About the only thing that bothered me in the book was how the author(s) taught more then two debuggers at once. I was able to keep track of GDB/DDD, but then they also taught the same functions for Eclipse's GDB interface which was a little confusing. The Eclipse interface should have had a chapter after explaining all of the GDB functions instead of intermingling. To work around this, a reader can simple skip the Eclipse related sections and then return to them at a later time.

This book also goes into a little detail of other debugging techniques such as strace/ltrace, along with some other information.

Again, a very good read if you code and debug! I give it 4 out of 5 stars.

Displaying review 1

Back to top

Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?
Ebook:  $31.95
Formats:  ePub, Mobi, PDF
Print & Ebook:  $43.95
Print:  $39.95