Debugging Windows Programs - Everett N. McKay, Mike Woodring

Debugging Windows Programs

Strategies, Tools, and Techniques for Visual C++ Programmers
Buch | Softcover
592 Seiten
2000
Addison Wesley (Verlag)
978-0-201-70238-5 (ISBN)
35,20 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
As liability for errors grows and as applications become ever more complex the need to test and debug code continues to increase. This book presents specific, practical debugging techniques for use when developing Windows programs.
Bugs happen -- and as code becomes increasingly complex, bugs become even harder to prevent, detect, and remove. Moreover, code built with COM, DCOM, ATL, and multithreading presents new debugging challenges. Debugging Windows Programs presents today's best techniques for tracking down bugs in Windows software -- as well as a strategic approach for achieving optimal results without unnecessary expense and delay. The book presents in-depth coverage of debugging using Visual C++ 7.0 and the MFC and ATL application frameworks, with much of the coverage applicable to other Windows C++ development environments and programming languages as well. Part I focuses on debugging strategies, including how to write code that helps reveal bugs. Next, the book shows how to make the most of the leading Windows debugging tools, including the Visual C++ Debugger. Finally, in Part III, the author focuses on specific solutions to the most common debugging problems, covering memory, pointers, function returns, Windows resources, and much more.

Everett N. McKay has been honing his debugging skills "the hard way" since 1975. He has been developing Windows programs since 1990, specializing in user interface design. He now works as a user interface program manager for a large, well-known software company based in Redmond, Washington. Everett is also the author of Developing User Interfaces for Microsoft Windows. Mike Woodring is an independent consultant specializing in system software development and an instructor for DevelopMentor, a premier research and training company that specializes in object technologies. Previously, he was a senior software systems engineer at Intel. He is co-author of Win32 Multithreaded Programming. 020170238XAB04062001

(Each Chapter concludes with "Recommended Reading")

Answers to Frequently Asked Questions.


Preface.


Introduction.
I. DEBUGGING STRATEGIES.

1. The Debugging Process.


The Five (Wrong) Stages of Debugging.



The Five Stages of Debugging.



Determining That a Bug Exists.



Gathering Bug Information.



Analyzing the Bug Information.



Removing the Bug.



Verifying the Change.



Debug Smarter, Not Harder.

2. Writing C++ Code for Debugging.


Design.



C++ Programming Style.



The C++ Language.



The Visual C++ Compiler.

3. Using Assertions.


The Limitations of Assertions.



Types of Assertions.



More MFC Assertion Macros.



Custom Assertions.



Portable Assertions.



Assertion Strategy.



Invariants.



Assertion Patterns.



Document Your Assertions.



Implementing AssertValid.



Defensive Programming.



Error Handling.



Miscellaneous Tips.

4. Using Trace Statements.


Types of Trace Statements.



Custom Trace Statements.



Trace Statement Strategies.



Miscellaneous Tips.

5. Using Exceptions and Return Values.


Incorrect Error Handling Results in Bugs.



The Need for a Strategy.



Using Exceptions.



Using Return Values.



Exceptions and Bugs.



C++ Exceptions versus Windows Structured Exception Handling.



Translating Structured Exceptions to C++ Exceptions.



Exception Performance.



Exception Strategy.



Defensive Programming with Exceptions.



Debugging Exceptions.



Miscellaneous Tips.

II. DEBUGGING TOOLS.

6. Debugging with Windows.


Postmortem Debugging.



Windows API Error Codes.



Windows Exception Basics.



Portable Executable Basics.



Rebasing DLLs.



Assembly Language Basics.



Debugging with MAP Files.



Debugging with PDB Files.



Debugging Using a Windows 98 Crash Dialog Box.



Debugging Using Dr. Watson.



Miscellaneous Tips.

7. Debugging with the Visual C++ Debugger.


Compiler and Linker Options.



Debug versus Release Builds.



Debugging Release Builds.



The Test Build.



Debugging Symbols.



The Debug Windows.



Watch Expressions.



Datatip Expressions.



Registers and Pseudo-registers.



Watch Window Formatting Symbols.



Using Autoexp.dat.



Debugging with Breakpoints.



Just-in-time Debugging.



Remote Debugging.



Debugging with Edit and Continue.

III. DEBUGGING TECHNIQUES.

8. Basic Debugging Techniques.


General Debugging Techniques.



Visual C++ Debugger Techniques.



Windows Debugging Techniques.



MFC Debugging Techniques.

9. Debugging Memory.


Why Memory Leaks Aren't Acceptable.



Types of Memory Debugging.



Using the Debug Heap.



How the Debug Heap Works.



Reading Windows Memory Addresses.



Debugging Memory Corruption.



Debugging Memory Leaks.



Debugging Windows Resource Leaks.



Debugging Windows Thread Stacks.



Miscellaneous Tips.

10. Debugging Multithreaded Programs.


What Is Multithreading?



Issues in Multithreaded Programs.



Writing Thread-safe Code.



Thread Creation and Termination.



Understanding the Debugger.



Debugging Techniques.

11. COM Debugging.


Chapter Basics.



Defensive COM Programming Practices.



Debugging Base COM DLLs.



Debugging Base COM EXEs.



Debugging Configured Components.



Debugging Base COM DLLs That Are Called From ASPs.

12. Desperate Measures.


Checking the Easy Stuff.



Using Your Head.



Rechecking Your Assumptions.



Checking the Obvious.



Checking the Code.



Checking the System.



Double-Checking the Documentation.



Using Other People.



Using Newsgroups.



Stop Living Dangerously.

Bibliography.
Index. 020170238XT04062001

Erscheint lt. Verlag 29.8.2000
Verlagsort Boston
Sprache englisch
Maße 234 x 187 mm
Gewicht 953 g
Themenwelt Informatik Betriebssysteme / Server Windows
Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
ISBN-10 0-201-70238-X / 020170238X
ISBN-13 978-0-201-70238-5 / 9780201702385
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
Insider-Wissen – praxisnah & kompetent

von Ed Bott

Buch | Hardcover (2023)
dpunkt (Verlag)
44,90
Daten abfragen und verarbeiten mit Excel und Power BI

von Ignaz A. Schels

Buch (2023)
Hanser (Verlag)
49,99