The /Oi switch enables or disables intrinsic functions in the Professional
and above versions of the compiler. If set, functions like memset are
compiled inline. Do search on /Oi in VS Help.
Gary G. Little
Sr. Staff Engineer
Broadband Storage, LLC
xxxxx@broadstor.com
xxxxx@delphieng.com
-----Original Message-----
From: Nate Bushman [mailto:xxxxx@Legato.com]
Sent: Thursday, March 01, 2001 2:04 PM
To: NT Developers Interest List
Subject: [ntdev] Re: AAAAAHHHH!! Locals getting trampled (windbg prob
lem?)
Phil, could you expand on this a bit? How does the /Oi flag affect
optimizations?
-----Original Message-----
From: Barila, Phil [mailto:xxxxx@intel.com]
Sent: Thursday, March 01, 2001 2:47 PM
To: NT Developers Interest List
Subject: [ntdev] Re: AAAAAHHHH!! Locals getting trampled (windbg prob
lem?)
While you are at it, if you use intrinsics, don’t forget to add the /Oi
switch to the line that sets the Free build MSC_OPTIMIZATION. Otherwise,
you will get working drivers in the Checked build, and the Free build will
die very mysteriously.
Phil
-----Original Message-----
From: Jay Talbott [mailto:xxxxx@mcg.mot.com]
Sent: Thursday, March 01, 2001 1:36 PM
To: NT Developers Interest List
Subject: [ntdev] Re: AAAAAHHHH!! Locals getting trampled (windbg
problem?)
John,
I don’t know about the issue with your locals getting trashed, but
the KB article below could be your problem with your “debug” builds
still creating optimized code. The “October 2000” MSDN CD version of
the DDK still has this problem. It gave me a few headaches until I
was filled in on the issue (thanks to Peter @ OSR) and corrected it.
- Jay
–
Jay Talbott
Staff Software Engineer
Motorola Computer Group
2900 S. Diablo Way
DW220
Tempe, AZ 85282
(602) 438-3481
xxxxx@mcg.mot.com
Article ID: Q263979
PRB: Checked Build Environment of WinHEC 2000 DDK
The information in this article applies to:
Microsoft Windows 2000 Driver Development Kit (DDK)
SYMPTOMS
When you build the checked version of a device driver by using the
WinHEC release of the Windows 2000 DDK, compiler optimizations are
turned on by default. This may result in difficulties while you debug
the driver.
RESOLUTION
A small change needs to be made to the %BASEDIR%\bin\Setenv.bat file
to correct this problem. The changes are as follows (in bold):
:checked
rem set up an NT checked build environment
set BUILD_ALT_DIR=chk
set NTDBGFILES=1
set NTDEBUG=ntsd
set NTDEBUGTYPE=windbg
set MSC_OPTIMIZATION=/Od /Oi [the /Od /Oi is in bold]
Additional query words:
Keywords : kbKMode kbOSWin2000 kbOSWin2000bug kbDSupport
Issue type : kbprb
Technology :
John Hirschi wrote:
Hi,
I am using WindBg to debug my driver and I have been seeing some
unexpected behavior. Sometimes when I step into a function, one
or more of the local variables aren’t displayed in the “Locals”
window. I tried bringing up their value in the “Watch” window,
but I usually get “Error : Cannot get value”. My only guess is
that they are being optimized out. But I am building a checked
build, I assumed that all optimizations would be off.Normally I wouldn’t write about something like this, I’d just put
in some debug statements and bow before my Microsoft shrine and
thank it that I have debug statements. But I’ve noticed that some
of my local variables get assigned the same address as the arguments
for the function they are in. As soon as one of my locals gets
assigned a value, the function argument gets set to that value,
too! I’ll have a seemingly innocuous statement like j = 0; and 3
out of my 5 locals get set to zero.My Help | About says I am using Microsoft WinDbg:2.0.0023.0 Version
5.0 (Build 2195: Service Pack 1).Can you please give me a suggestion for a solution?
Thanks
John
You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@legato.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com