Debugging Application For Microsoft Dot Net And Microsoft Windows
作者:John Robbins
出版社:微软
出版日期:2003
简介:
This book brings a vast amount of Windows-specific debugging
information together in one place and has been very helpful to me. Some
of this info could be found elsewhere, but only by sorting through
dozens of documentation pages and magazine articles, some many years
old, and additionally the author adds value by giving very explicit
instructions (even providing source code) on how to do things that are
often only hinted at in the Microsoft documentation.
Most useful to me were the symbol-server tips, the SuperAssert
macro and seeing how it does it what it does, crash handling in
general, and the author's insight into why certain things are so slow
(like OutputDebugString).
This book does have a not-so-subtle anti-C++ bias, there are little
digs at C++ coding techniques throughout the book, which seem a little
antiquated and inappropriate in 2005.
In the chapter on the debug C-runtime, I'm really surprised the
author does not suggest writing a leak-detection system that captures
the callstack at the time of allocation, I've found the C-runtime's
file-and-line-oriented leak report fairly useless since the allocation
is often deep inside some container class, you really need to know what
code caused the allocation, not what code actually did the allocation.
And the recommended feature that walks the entire heap every N
allocations is unusable (it's too slow) in a large C++ program which
might have many thousands of allocations. Also, redefining C++ keywords
as suggested seems so evil, there are better ways of doing this.
I believe Windows XP Service Pack 2 changed some Windows internals
that affect crash handling/debugging/stack walking, I wouldn't mind
seeing an updated volume that covers these changes in detail.
Overall though, an excellent book, the most useful debugging book I've found so far.
阅读(416) | 评论(0) | 转发(0) |