The developer's guide to debugging

Thorsten Grötker ... [et al.]

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, I always found it regretable that debugging is hardly taught in engineering schools. Well, it is a tricky subject, and there are no good textbooks. The latter can be helped, I thought. 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 inlined examples and exercises at the end of each chapter it is well suited to accompany a CS course or lecture. At the same time it can be used as a reference used 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 most principles described in "The Developer's Guide to Debugging" to programs written in other languages. The techniques are not restricted to a particular compiler, debugger or operating system. The examples are structured such that they can be reproduced with free open-source software.

「Nielsen BookData」より

[目次]

  • 1. You write Software
  • You have Bugs - Why You Need This Book. 2. A Systematic Approach to Debugging. 2.1 Why follow a structured process? 2.2 Making the most of your opportunities. 2.3 13 golden rules. 2.4 Building a good toolkit. 2.5 Know your emeny - meet the bug family. 3. Getting to the Root - Source Code Debuggers. 3.1 Visualizing program behavior. 3.2 Prepare a simple predictable example. 3.3 Get the debugger to run with your program. 3.4 Learn to do a stack trace on a program crash. 3.5 Learn to use breakpoints. 3.6 Learn to navigate through the program. 3.7 Learn to inspect data. 3.8 A debug session on a simple example. 4. Fixing Memory Problems. 4.1 Memory management and access in C/C++. 4.2 Memory debuggers to the rescue. 4.3 Example 1: detecting memory access errors. 4.4 Example 2: broken calls to memory allocation/deallocation. 4.5 Combining memory and source code debuggers. 4.6 Cutting down the noise - suppressing errors. 4.7 When to use a memory debugger. 4.8 Restrictions. 5. Profiling Memory Use. 5.1 Basic strategy - the first steps. 5.2 Example 1: allocating arrays. 5.3 Step 1 Looking for leaks. 5.4 Step 2 Setting your expectations. 5.5 Step 3 Consumption over time, with multiple inputs. 5.6 Step 4 Identifying greedy data structures and program locations. 5.7 Putting it together - the "genindex" example. 6. Solving Performance Problems. 6.1 Finding performance bugs - a step-by-step approach. 6.2 Using profiling tools. 6.3 Analyzing I/O performance. 7. Debugging Parallel Programs. 7.1 Writing parallel programs in C/C++. 7.2 Debugging race conditions. 7.3 Debugging Deadlocks. 7.4 Familiarize yourself with threading analysis tools. 7.5 Asynchronous events and interrupt handlers. 8. Finding Environment and Compiler Problems. 8.1 Environment changes - where problems begin. 8.2 How else to see what a program is doing. 8.3 Compilers and debuggers have bugs too. 9. Dealing with Linking Problems. 9.1 How a linker works. 9.2 Building and linking objects. 9.3 Resolving undefined symbols. 9.4 Symbols with multiple definitions. 9.5 Symbol clashes. 9.6 Identifying compiler and linker version mismatches. 9.7 Solving dynamic linking issues. 10. Advanced Debugging. 10.1 Setting breakpoints in C++ functions, methods, and operators. 10.2 Setting breakpoints in templatized functions and C++ classes. 10.3 Stepping in C++ methods. 10.4 Conditional breakpoints and breakpoint commands. 10.5 Debugging static constructor/desstructor problems. 10.6 Using Watchpoints. 10.7 Catching signals. 10.8 Catching exceptions. 10.9 Reading stack traces. 10.10 Manipulating a Running Program. 10.11 Debugging without debug information. 11. Writing Debuggable Code. 11.1 Why comments count. 11.2 Adopting a consistent programming style. 11.3 Avoiding preprocessor macros. 11.4 Providing additional debugging functions. 11.5 Prepare for post-processing. 12. How Static Checking Can Help. 12.1 Using compilers as debugging tools. 12.2 Using lint. 12.3 Using static analysis tools. 12.4 Beyond static analysis. 13. Summary. A Debugger Commands. B Access to Tools. B.1 IDEs, compilers, build tools. B.2 Debuggers. B.3 Enviornments. B.4 Memory debuggers. B.5 Profilers. B.6 Static checkers. B.7 Tools for parallel programming. B.8 MapReduce. B.9 Miscellaneous tools. C Source Code. C.1 isort.c. C.2 filebug.c. C.3 tesmalloc.c. C.4 genindex.c. References. Index.

「Nielsen BookData」より

この本の情報

書名 The developer's guide to debugging
著作者等 Grötker, Thorsten
Holtmann, Ulrich
Keding, Holger
Wloka, Markus
Grotker Thorsten
出版元 Springer
刊行年月 c2008
ページ数 xix, 224 p.
大きさ 25 cm
ISBN 9781402055393
NCID BA91840890
※クリックでCiNii Booksを表示
言語 英語
出版国 オランダ
この本を: 
このエントリーをはてなブックマークに追加

このページを印刷

外部サイトで検索

この本と繋がる本を検索

ウィキペディアから連想