The Developer's Guide to Debugging
| 2008-08-01 00:00:00 | | 0 | Programming
Software has bugs. Period.
That's true, unfortunately. Even the good old `hello, world` program, known to virtually every C and C++ programmer in the world, can be considered to be buggy. Developing software means having to deal with defects; old ones, new ones, ones you created yourself, and those that others brought to life. Software developers debug programs for a living.
Hence, good debugging skills are a must-have. That said, it is regrettable that debugging is hardly taught in engineering schools. That's how the idea for this book was born.
The Developer's Guide to Debugging is a book for both professional software developers seeking to broaden their skills and students that want to learn the tricks of the trade from the ground up. With small examples and exercises it is well suited to accompany a CS course or lecture. At the same time it can be used as a reference guide to address problems as the need arises.
This book goes beyond the level of simple source code debugging scenarios. In addition, it covers the most frequent real-world problems from the areas of program linking, memory access, parallel processing and performance analysis. The picture is completed by chapters covering static checkers and techniques to write code that leans well towards debugging.
While the focus lies on C and C++, the workhorses of the software industry, one can apply many techniques described in The Developer's Guide to Debugging to programs written in other languages.User review
Absurdly overpriced basic book with a pile of fake five-star reviews.
Finally I got to this book. It's not bad actually -- as far as it goes. It consists of two major themes: a quick overview of the debugging tools available on Unix and a bunch of debugging advice. The former is useful somewhat, for a one-pass quick read when you're curious whether there's something else out there you might want to add to your toolbox. The latter is OK but awfully basic, primitive; to me it seems even superfluous (I can't imagine anyone who can write code needs most of this advice). That said, there's nothing wrong with any of it. Finally, a book like that should have been published by O'Reilly and sold for twenty bucks, not eighty. One more thing: I'm very certain that a pile of facile, content-free but invariably five-star reviews that appeared here immediately upon the book's release have been posted by the author's friends and/or publisher's personnel. This is not a five-star book, so beware. If you can get it for cheap second-hand, maybe you want it. For eighty bucks, no. This is not a book you'll read twice, and moreover, you can find everything you need to know about the available tools on the net for free. And anyone who has programmed, say, for a year, will find the debugging advice given in this book largely superfluous.User review
A consistent approach to debugging real-life problems with user-land C and C++ code on Linux environments
I finally read this book from cover to cover and I must say it is the very sound book and presents a consistent approach to debugging real-life problems with user-land C and C++ code on Linux environments. Although it uses mainly GDB for illustrations and provides Visual C++ equivalents when possible it doesn't cover Debugging Tools for Windows and its main GUI debugger, WinDbg. To rectify this I created extensive notes while reading available on my Software Generalist blog. Additional reader audience for this book might include a Windows engineer who needs to debug software on Linux or FreeBSD so a quick GDB crash course is needed. It would also serve as an excellent debugging course or as a supplemental course to any C or C++ course. Highly recommended if you are a Linux C/C++ software engineer. Even if you are an experienced one, you will find something new or make your debugging more consistent. If you need to teach or mentor juniors, this book helps too.
Founder of DumpAnalysis Portal
Editor-in-Chief of Debugged! MZ/PE magazineUser review
Very expensive for a middle-range coverage
I dont know why so many people give this bool 5 starts. If you are an intermediate-advanced programmer every chapter in this book will sound to you. Nothing new. The only positive thing is that the book show you schematics ways to front the problems,,,, but IMHO that price is high for those material.User review
The Art of Debugging!
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.User review
The Developer's Guide to Debugging
A solid text on debugging and profiling for C/C++ programming. It identifies the available tools, both open source and proprietary, explains good debugging methodologies, and provides brief but informative examples. It covers a lot of ground so the level of detail is limited, but it is the best overall compendium of this information that I have seen.