Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Problem examining variables in debugger

bruegge
Beginner
229 Views

I intermittently encounter problems while debugging a large, mixed language application (Fortran, C/C++). I am using version 9.1 of the Intel C/C++ and Fortran compiler and MS Visual Studio 2005.

The problem that I encounter is that I am unable to examine the value of variables sometimes. The message that is generated is:

CXX0069: Error: variable needs stack frame

Sometimes this occurs when I step into a new block in C/C++, e.g.

.... code where I am able to examine variables...

{

.... when I step into this block, variables that I was able to examine outside of this code block are no longer "visible" to the debugger. This does NOT appear to be a problem with name conflicts, where a variable declared in the block masks an identically named variable from outside the block.

}

Has anyone else encountered this problem and does anyone know how to get around it?

I don't know if this is relevant or not, but Main is written in C++.

0 Kudos
2 Replies
TimP
Honored Contributor III
229 Views
In 32-bit compilation, the option -fomit-frame-pointer is popular, to free up a general register for code optimization, at the expense of debugging. If this option has been used, it would account for your problem.
0 Kudos
Dale_S_Intel
Employee
229 Views
I believe "-fomit-frame-pointer" is the default for icc. Try adding "-fno-omit-frame-pointer" and see if that fixes the problem.

Dale
0 Kudos
Reply