Re: WIN32
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Wed, 01 Jul 2009 11:01:55 -0400
There isn't a lot we could do about the requirement of a second computer for debugging.
The only tools that Microsoft delivers that allow debugging a device driver require that
the debugger run on one machine and the target driver run on another. Besides being the
only sensible and safe approach. So I'm not sure how you can validly complain that we
describe the only scenario Microsoft supports for debugging. At that time, it was
possible to do one-machine debugging with Soft-ICE, but that product is many years dead at
this point, and wasn't a very good idea at the time. Unless you do an incremental backup
before each test, because you have to assume that a malfunctioning driver will clobber
your hard drive! And yes, I've seen it happen in class, which is why we always ship an
extra machine and a set of ghost disks to reinstall the environment.
Note that VMs did not exist when we wrote the book, and there is a lively debate in
another newsgroup as to whether or not it is even possible to debug a device driver under
a VM scenario (many anecdotes of failure seem to dominate the discussion). Given that it
takes 3-6 months to write a device driver, a second machine is a tiny, tiny investment
compared to the cost (to an organization) or revenue (to an individual).
The other books on driver writing also describe the two-machine debugging scenario.
In writing drivers, the raw technology is easy compared to the "stories" part; the problem
with the Microsoft documentation is that it is "all of the facts and none of the truth".
What matters is not how the particular DDI calls work, but how they relate in context to
each other, and the consequences of ignoring that relationship (Blue Screen Of Death,
typically). 54%-80% of all Windows crashes are bad third-party drivers, usually caused by
either application-level-style programming (unacceptable programming style for drivers) or
not understanding the principles of ("stories about") how drivers work.
If we had time, we would consider a new driver book, but it takes a year of effort. During
that time, somehow, I have to actually generate enough revenue to support myself. So does
my co-author.
joe
On Wed, 1 Jul 2009 04:21:11 -0700 (PDT), Stuart Redmann <DerTopper@xxxxxx> wrote:
Joseph M. Newcomer wrote:Joseph M. Newcomer [MVP]
[snip]
Learning the API is not enough. Windows is a system where the clarity and maintainability
of code critically depends upon adopting a good style, and Petzold actively "teaches away
from" that style. I'll go so far as to say I don't care if anyone buys our book, but I
really, really care that nobody takes Petzold's style seriously. It did a generation of
damage to Windows programmers.
I read your book with much interest, you have certainly done a great
job. However, I was a bit disappointed about the "WinNT driver
programming" book. Too much stories, too much warnings that one should
buy a second computer for debugging. However, if you wrote/co-authored
a new book about about WDM or WDF, I'd be the first to buy it.
Regards,
Stuart
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: WIN32
- From: Daniel James
- Re: WIN32
- References:
- Re: WIN32
- From: Stuart Redmann
- Re: WIN32
- Prev by Date: Re: 'Weak type' class
- Next by Date: Re: WIN32
- Previous by thread: Re: WIN32
- Next by thread: Re: WIN32
- Index(es):
Relevant Pages
|