The Art of Debugging with GDB, DDD, and Eclipse

The Art of Debugging with GDB, DDD, and Eclipse
Authors
Norman Matloff, Peter Jay Salzman
ISBN
1593271743
Published
29 Sep 2008
Purchase online
amazon.com

Debugging is of central importance to successful software development, and yet many beginning programmers are unaware of the techniques they can use to reduce the time they spend finding and fixing programming errors. GDB, a popular open source debugger, allows a programmer to trace program execution line by line, set breakpoints, inspect variables, and look at what the program is doing at any given time.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Mark K. said
I must come clean first - I know the authors. Peter asked me to review one of the sections in the book many ages ago when the book was in its infancy. The book has progressed much since then, and I must admit this is much more than I was expecting from a book about debugging!

Chapters 1 through 3 are the starter chapters that discuss the core debugging paradigms such as breakpoints and variable analysis. Chapter 1 goes through some of the basic concepts of debugging for those new to the idea (e.g., hobbyists and just-out-of-college programmers) but it's probably less useful for those already familiar with the concept. Chapter 2 goes through the basic debugging operations, such as setting breakpoints and analyzing variables, with an emphasis on how breakpoints can be set, cleared, and triggered using various methods. Chapter 3 goes through more on how variables of different storages can be viewed and displayed.

Chapters 4 and 5 are where things start to get interesting. Chapter 4 discusses how the debugger can be used to analyze core dumps, and touches on operating system concepts just enough to be productive in debugging for those not familiar with OS architectures. Chapter 5 discusses debugging threaded applications. As examples, applications written using popular multi-threaded and multi-process libraries such as pthread, MPI, and OpenMP are discussed, which makes the chapter more practical.

Chapter 6 is an interesting chapter. Section 6.1 goes through some common compiler error messages and how one should interpret them. They're concepts all first semester programming course students should read. It should be read either before chapter 1 or immediately after for beginning programmers, but it's also an entertaining section to read for the experienced programmers who goes through what the section discusses on a daily basis without ever giving it a second thought anymore. Section 6.2 should be a great read for anyone whose hair turned gray trying to debug Curses or NCurses applications under UNIX.

Chapter 7 discusses various tricks programmers use to write less buggy programs. Most of these are widely known concepts that are rarely taught in class - Vim tricks for matching parentheses, syntax highlighting, using errno and perror, libraries for catching buffer overflows, etc. Mentioning of the __LINENO__ directive is strangely lacking in this chapter, and I'm not sure how useful lint is these days but the chapter looks as complete as one would expect. The chapter also delightfully introduces strace and ltrace, though more examples would be helpful for those not familiar with OS concepts.

The final chapter is for those that want to use GDB/DDD/Eclipse in other languages. I have never felt the need to use debuggers with scripts but I probably would sing a different tune once I start using it.

The book admittedly has a Linux slant to it, but practical examples need a practical platform under which to give the examples and Linux is as accessible as it gets for most people. Most of the discussions are applicable in any platform, but they are especially applicable in Linux and UNIX variants. Chapters 1 and 6 should be a part of all introductory programming courses and should provide a good starting point to which a seasoned programmer can point a new programmer. The remaining chapters are relatively easy read yet packed with useful information to which programmers will refer back asking themselves, "what was that command that does ...?"

Alexander Reyngold said
I found this book to be an excellent introduction to debugging with GDB. However, this book takes you beyond merely an introduction but also to a fairly advanced level. I highly recommend this book.

Daniel McKinnon said
'The Art of Debugging with GDB, DDD, and Eclipse' is a great book for developers who work primarily on the Linux/Unix side of things and want to improve their debugging skillset. Packed with 250+ pages of material spread over 8 chapters, you will learn the basics of how to debug, what to look for, how to deal with major issues and all the goodies! If you are primarily a developer outside the .NET world, this is a good resource to read and learn from.

***** RECOMMENDED

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are 10 types of people in the world, those who can read binary, and those who can't.”