How can I print the value of static const class members in gdb?
Say I have:
#include <iostream>
struct foo {
static const int bar = 5;
};
int main() {
std::cout << foo::bar;
return 0;
}
How do I examine the contents foo::bar in gdb?
I tried:
(gdb) p foo::bar
No symbol "foo" in current context.
(gdb) p 'foo::bar'
No symbol "foo::bar" in current context.