When debugging a c++ program, gdb is unable to find symbols in scopes more
local than function level. Source and directions for repeating the problem
--- source file a.cxx
a = 0;
int main(int argc, char* argv)
--- end source file a.cxx
compiled with 'g++ -g -o a a.cxx'
debugged with 'gdb a'
(breaks in TestClass::Init())
t should be in scope here, as we are at the t.Init() line. Instead we
get a 'No symbol "t" in current context.' message.
I tested this on an RH6.2 system and it worked properly.
I ran this test case using
'kgcc -x c++ -o a a.cxx'
(kgcc as shipped with RH7, egcs-2.91.66)
to compile it, and it worked correctly, so this appears likely to be a bug with
the debug info output by the gcc 2.96 package, rather than with gdb.
jakub, assigning to you... I know I did so a couple of months ago with a very
similar bug (probably duplicate), but you know the gcc bu
g numbers better than me.
*** This bug has been marked as a duplicate of 18707 ***