Debug me --- if I bugged you enough!
No it is not what you think I'm saying! It is your software packages is saying, right?
So you designed, developed, and debugged your software package. It consists of several user and some kernel components. You have your unittest component you built while you were coding your design, you tested...
It works. You feel proud of yourself! And you should be proude of yourself! Enjoy your spirit...
Then comes the testing from the testing people, including a majority of harness/stress/perf testings. And for all of these, unless yours is a big software house, prefabricated tests suits are used.
One particular scenario is the storage stack under windows. What happens if you have 3 or 4 components in the kernel that are directly adding values to the storage stack? Oh, that surely scare the hell out of me. It's like plugging a pacemaker into an otherwise healthy heart!!! Of course, there are other examples where - a thorough third party off the shelf test suits are required to be run on test machines.
For harness tests, on storage stack I learned to run SysMark, PCMark etc. Well, these are to test an all round different scenarios an user might end up with when they play with their PCs!
The problem comes, when these softwares are not that solid! What to expect when such a preview package is for free?
So one alternative is to run the tests under kernel debugger configured, meaning, the system boots up to the boot configuration where the debugger is on. Exception or other test application faults happens, you take down the symptom, and take the test part out of the test suits, if you can. But some of the exceptions could be handled by the system, if debugger is not hooked up.
Under this last condition, when the test suit runs fine without debugger enabled, is particularly a good one. Now you can not configure debugger, so what you do?
Well, here comes the DbgView from sysinternals ( now Microsoft tools).
What should I do now?
-- Well the tests runs for hours, it boots and reboots during the tests.
-- I need to have certain informations being printed to logs from the kernel component we developed.
These two are the basic goal. How do we solve it?
We can develop the components for debugging. Yeah, some will get scared to hear that "Develop for debugging". So for DbgPrintEx, you can use your own masks based on your components' features. If they are enough modular, you can have module specific masks.
Now you will have to enable the registry entries for the test systems. Here is what you need ( read online for the detail about what you need to create in the registry hive )
Now you need a batch file, that would start at boot time. You store this batch file and dbgview.exe in c:\. Then you make a short cut of this batch file. Then from Windows->Start->All Programs->Startup, right-click then open then cut and paste the short cut. So first you copy the short cut then windows->Start->
@echo off
rem -- launch dbgview at startup
start c:\dbgview.exe /t /f /l c:\dbgviewLog /g /k /m 10 /p /w
First time it boots, it will ask for accepting license args. Next time onward, it would automatically start at boot time.
Here is some sample result from the logfile (dbgviewLog)
[\\VANHALEN-D4]
00000001 0.00000000 KTM: TmRollbackTransaction for tx 61859f0
00000002 0.01082284 KTM: TmRollbackTransaction for tx 61859f0
00000003 0.02614005 KTM: TmRollbackTransaction for tx 61859f0
00000004 0.03681052 KTM: TmRollbackTransaction for tx 61859f0
00000005 41.99409103 TpmEvtEntropyTimer().
00000006 118.64528656 KTM: TmRollbackTransaction for tx 5ae0c80
00000007 118.65682220 KTM: TmRollbackTransaction for tx 5ae0c80
Enjoy!
References (3)
-
Response: essay servicesI really realize these things. If I want to learn new thing. Then I should take more and more informative activities for every aspect of life.
-
Response: ipad air 3 best cover
-
Response: idol net worth
Reader Comments