> I compiled the code in debug mode, but still get <optimized out>in debugger
> for some variables.
> Is this a usual problem or I am doing something wrong?
It's not common but it may happen on rare occasions. I'm still surprised
though. What do you get when you say
ldd my_executable | grep deal_II
where my_executable is the executable program in the directory you're working
in? It should show
libdeal_II.g.so if you are linking against the debug mode
libraries (not the .g. in the middle).
The typical case where a variable may be optimized out even in debug mode is
code like this:
class X {
static const unsigned int dim = 2;
};
Here, 'dim' is essentially just an alias for the number 2. It may not have a
memory location. Otherwise, compilers have become pretty good at producing
reasonable debug information.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@math.tamu.edu
www:
http://www.math.tamu.edu/~bangerth/