User forums > General (but related to Code::Blocks)

Cannot evaluate function -- may be inlined

(1/8) > >>

smallB:
While debugging and trying to watch  std::string obj I'm getting the following info:
Cannot evaluate function -- may be inlined;
Is this behavior intentional?

zabzonk:
Intentional in what way? It's an inevitable result of the way that inlining works - if a function actually is inlined,  there is no named function representation in the compiled code to watch.

smallB:
Neil, I don't know in what way intentional. I've asked if it is intentional because few times I've pointed out that some of the behavior of cb seems either illogical or not fully baked and I've got response that the behavior is intentional. That's why this time I've asked.
Now to coding, same code different response:

--- Code: ---#include <string>

int main(int argc, char* argv[])
{
std::string s("Ala ma kota");//this is observable in vs but not in cb - is this intentional?
return 0;
}
--- End code ---

smallB:
Same here:

--- Code: ---template<class Int_T>
template<class Forward_Iterator>
    std::string Calculator_engine<Int_T>::read_next_token_(Forward_Iterator& beg,Forward_Iterator& end)
    {
        std::string result;
        if (std::isdigit(*beg))//On this line I'll get info from cb: Attempt to take contents of a non-pointer value.
        {//when in fact beg is an iterator to std::string and has pointer semantics and this should be "observable"
            return get_term_(beg,end);
        }
        else if (is_operator_(beg))
        {
            return get_operator_(beg,end);
        }
        else
        {
            throw Incorrect_Expression();//[opportunity to show exact place of error]
        }

    }
--- End code ---

oBFusCATed:
Does it work, when you debug with GDB directly from the command line?
Do you have debugging symbols? Have you disabled the optimizations?

Navigation

[0] Message Index

[#] Next page

Go to full version