Jump to ratings and reviews
Rate this book

The Art of Debugging with GDB, DDD and Eclipse

Rate this book
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.

280 pages, Paperback

First published January 1, 2007

35 people are currently reading
253 people want to read

About the author

Norman Matloff

9 books7 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
36 (34%)
4 stars
39 (37%)
3 stars
18 (17%)
2 stars
8 (7%)
1 star
4 (3%)
Displaying 1 - 12 of 12 reviews
Profile Image for Anton Antonov.
350 reviews48 followers
November 25, 2015
A must-read for every software developer. Debugging is a sure way to make your life easier if you understand what you're doing.

The art Art of Debugging is focusing specifically on the most popular debugging tool - gdb while providing code examples in C/C++. The debugging scenarios handle even the most situations (crashes, threads and networking).

The other tools mentioned are DDD and Eclipse, but in my opinion they're rightfully with lesser focus. GDB is the real gem that needs a lot of learning and practice to master.
Profile Image for Khanh Cao.
34 reviews2 followers
November 15, 2020
A bit old, many commands will have to be adjusted to run properly (about 50%). Some libraries have changed their names so try to search up on StackOverflow for better-updated information..

Still a very helpful book overall! Would recommend!
Author 1 book3 followers
July 22, 2017
Странная книга.

Во время чтения вообще не нравилось.

* Похоже на очень сильно растянутый tutorial. Поначалу кажется, что всё полезное в книжке можно было бы уместить на лист A4. Ну или на два.
* Примеры старые. Т.е. если взять более-менее актуальную версию Ubuntu + gdb, то вывод в примерах будет выглядеть по-другому. И вести себя приложения уже будут по-другому. Это делает чтение не очень удобным.
* Код примеров страшненький. Некоторые примеры открываешь и баги видно прямо тут же. Автор рассказывает, насколько он быстрее найдёт баг с помощью gdb по сравнению с отладкой printf-ами. А если бы он в код заглянул, то для трёх багов из четырёх не пришлось бы даже компилировать.
* Совершенно ненужные куски про Eclipse и почти ненужные про DDD (зато с картинками, которые объём книги раза в полтора увеличивают).

С другой стороны, когда дочитал и стал просматривать, то оказалось, что всё не совсем плохо:

* Есть некоторая системность -- достаточно подробно рассказывается, откуда берутся segmentation fault или проблемы в многопоточном коде. И уже потом, как их отлаживать.
* По результатам примеров я примерно осознал, как работать с gdb. Не могу сказать, что стало прям удобно-удобно, но часть возникших рабочих задач я решал уже с помощью lldb, а не с помощью вывода в лог. Не уверен, что результат я получил быстрее, но дополнительный инструмент это всегда хорошо.
* Рассматриваются разные реальные ситуации при отладке:
- отладка приложений, которые много пишут в поток вывода (или, как в книге, curses-приложения, которым нужен отдельный терминал)
- использование инструментов типа strace, ltrace или mcheck/mtrace для отлова странных ошибок и проездов по памяти
- работа с другими языками из DDD

Тем не менее, рекомендовать не готов.
Tutorial по gdb можно найти и покороче.
11 reviews1 follower
September 27, 2018
The book claims to be about GDB, DDD, and Eclipse but really GDB is the star of the show, DDD gets some references, and Eclipse feels like it was possibly included as an afterthought because the publisher insisted on it. The book is clearly aimed at the sort of person writing code in Linux using vim, which is fine for me. :D Historically I've been a trace debugger but until reading this book I hadn't realised the power of GDB and it has definitely convinced me to start using it in the future! It as had a useful chapter near the end suggesting other tools but with the glaring omission of valgrind.
Profile Image for Jose  Seco Sanz.
261 reviews17 followers
July 12, 2023
A book that is a bit outdated, but it still contains some good info.

I think that probably for the modern way of doing things you should look for the books on Memory Forensics and Digital Forensics.
10 reviews
June 9, 2019
If you're new to c/c++ debugging and want to learn more on gdb, this book is for you. Currently, i'm reading this book (218 of 372 pages) and i think this book worth the time, it takes. Each chapter focus on some aspect of debugging/diagnosing and give the reader insights, tricks and examples of effective usage.
Profile Image for Dan.
87 reviews
Want to read
December 25, 2017
A practical tutorial on debugging using GDB (the GNU project debugger) and DDD (the Data Display Debugger, a graphical front end)
Displaying 1 - 12 of 12 reviews

Can't find what you're looking for?

Get help and learn more about the design.