|
|
|||
|
||||
OverviewSoftware 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. Full Product DetailsAuthor: Thorsten Grotker , Ulrich Holtmann , Holger Keding , Markus WlokaPublisher: Springer Imprint: Springer Edition: 1st ed. Softcover of orig. ed. 2008 Dimensions: Width: 15.60cm , Height: 1.30cm , Length: 23.40cm Weight: 0.351kg ISBN: 9789048173877ISBN 10: 9048173876 Pages: 244 Publication Date: 19 October 2010 Audience: Professional and scholarly , Professional & Vocational Format: Paperback Publisher's Status: Active Availability: In Print This item will be ordered in for you from one of our suppliers. Upon receipt, we will promptly dispatch it out to you. For in store availability, please contact us. Table of Contents1. 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.ReviewsFrom the reviews: Thorsten Grotker, Ulrich Holtmann, Holger Keding, and Markus Wloka speak directly to the entrenched developer, give straight-forward advice on solving debugging problems and come up with solutions real fast. Whether it is solving memory problems, debugging parallel programs, or dealing with problems induced by your very tool chain - this book offers ?rst aid that is tried and proven. When dealing with today's programs, especially those written in C and C++, we'll still spend some time on debugging -- and that's where The Developer's Guide to Debugging provides truly priceless advice. Saarland University, Spring 2008 - Andreas Zeller Grotker and colleagues tell readers how to set up a structured process for debugging, categorize the possible bugs, demonstrate writing programs so that they may be more easily debugged, and examine the various tools available. ! Surely an essential resource for professional programmers. Summing Up: Highly recommended. Academic, professional, and two-year technical program libraries, all levels. (R. P. Sarna, Choice, Vol. 46 (6), February, 2009) This is a comprehensive guide to debugging C and C++ programs. ! This is the only book I have seen that not only exhaustively covers C/C++ debugging in most common environments, but also gives one a choice of tools to use for each type of problem. I recommend the book to C developers, or as a reference for instructors of C programming courses. (P. Spoerri, ACM Computing Reviews, January, 2009) From the reviews: Thorsten Grotker, Ulrich Holtmann, Holger Keding, and Markus Wloka speak directly to the entrenched developer, give straight-forward advice on solving debugging problems and come up with solutions real fast. Whether it is solving memory problems, debugging parallel programs, or dealing with problems induced by your very tool chain - this book offers ?rst aid that is tried and proven. When dealing with today's programs, especially those written in C and C++, we'll still spend some time on debugging -- and that's where The Developer's Guide to Debugging provides truly priceless advice. Saarland University, Spring 2008 - Andreas Zeller ""Grotker and colleagues tell readers how to set up a structured process for debugging, categorize the possible bugs, demonstrate writing programs so that they may be more easily debugged, and examine the various tools available. ! Surely an essential resource for professional programmers. Summing Up: Highly recommended. Academic, professional, and two-year technical program libraries, all levels."" (R. P. Sarna, Choice, Vol. 46 (6), February, 2009) ""This is a comprehensive guide to debugging C and C++ programs. ! This is the only book I have seen that not only exhaustively covers C/C++ debugging in most common environments, but also gives one a choice of tools to use for each type of problem. I recommend the book to C developers, or as a reference for instructors of C programming courses."" (P. Spoerri, ACM Computing Reviews, January, 2009) Author InformationTab Content 6Author Website:Countries AvailableAll regions |