SI Win 95



I understand optimizations impose a technical problem for debuggers. However, the MSVC IDE seems to handle the optimized code correctly.  If, however, the problem is not going to be fixed, don't you think it should be stated more clearly in SoftIce documentation *what* optimizations are not handled and should be avoided for debug sessions.

I'm having problems viewing local variables and parameters in (most, but not all!) C methods when optimizations are enabled in MSVC 5.0. I'm working on an NDIS driver written in C . I'm able to set a breakpoint on a particular method, step into. The local variable window displays  correct names and data structures, however, the addresses are all wrong, including *this* pointer. This makes the tool (which I came to love) not very useful *unless* I disable compiler  optimizations for my project. It works fine then. Here's the list of optimizations I have to disable:

- Global Optimizations

- Favor Small Code

- Frame Pointer Omission (main suspect?)

- Full Optimization

Please advise me whether this is a known problem.


This isn't an issue that we consider a need to fix.  We have always suggested that you build without optimizations because of the inherent problems with it.  I agree that it could be stated more clearly in the manual and I will see that it is.  My suggestions for optimizations would be to disable ALL of them.

SoftICE does not support the symbolic debugging of programs that have optimizations enabled.  Due to the way that debug information is organized it is impossible for SoftICE to accurately display information on programs that were built with optimizations enabled.

Old KB# 11730
Comment List
Related Discussions