I am using WndDbg 6.1.0017.2 to debug a SCSI miniport driver. The problem
that I am having is that the debugger is behaving very strangely. Below
are some of the symptoms:
-
After hitting a break point within a function not all of my Local
variables are being display (View->Locals). The ones that are displayed
are fequently wrong.
-
When single stepping through code the debugger frequently does not step
through correctly – it will jump around. Although the code is executed
correctly.
-
Using DebugPrint the data is not always displayed correctly. It is just
plain wrong for some reason.
This miniport is being developed for Win2K. I have used WinDbg v 5.xx and
have gotten the same exact problems.
Does anyone have any idea what might be wrong here? Is there a different
method for debugging miniports? BTW: I have verified that symbols are
correct.
Thanks,
Dale
Missing locals and “jump around” while stepping is because you are
debugging optimized code.
The optimizer does optimize away vars & does rearrange code. If you
wish to understand what the compiler did then it is helpful to have the
compiler generated an ASM/source mixed listing file.
The easiest thing to do is to debug unoptimized code. However you can
never get 100% away from debugging optimized code, so some practice is a
good thing…
Don’t have enough info to know if your wrong data issue is caused by
optimizeation or not. I could see in some scenerios that the
optimization may invalidate your assumptions of what the value should be
at a given time.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hill-eng.com
Sent: Friday, October 31, 2003 4:35 PM
To: Kernel Debugging Interest List
Subject: [windbg] WndDbg with SCSI Miniport
I am using WndDbg 6.1.0017.2 to debug a SCSI miniport driver. The
problem
that I am having is that the debugger is behaving very strangely. Below
are some of the symptoms:
-
After hitting a break point within a function not all of my Local
variables are being display (View->Locals). The ones that are displayed
are fequently wrong.
-
When single stepping through code the debugger frequently does not
step
through correctly – it will jump around. Although the code is executed
correctly.
-
Using DebugPrint the data is not always displayed correctly. It is
just
plain wrong for some reason.
This miniport is being developed for Win2K. I have used WinDbg v 5.xx
and
have gotten the same exact problems.
Does anyone have any idea what might be wrong here? Is there a different
method for debugging miniports? BTW: I have verified that symbols are
correct.
Thanks,
Dale
You are currently subscribed to windbg as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
No this is not a code optimization problem. The “jumping around” is
different then that – you’d have to see it. Having your local go away is
defintely not a code optimization problem. Thanks any way.
Hmmm and you know this for a fact? You realize that you just blew off one of
the MS fells that has been providing Windbag support for about 5 years? But
then I guess you know better then he.
“Jumping around” most definitely IS a code optimization problem. I’ve been
using Windbag for almost 10 years and the ONLY times I have “jumping around”
problems is when I was running the RELEASE version with optimization or had
accidentally turned it on in the checked version. And frequently that is
because I was testing the release build, found a problem, and FORGOT to
replace it with the checked build before I started the debugger.
–
Gary G. Little
Seagate Technologies, LLC
wrote in message news:xxxxx@windbg…
>
> No this is not a code optimization problem. The “jumping around” is
> different then that – you’d have to see it. Having your local go away is
> defintely not a code optimization problem. Thanks any way.
>
>