[Converted from Gnats 789] If a C++ program has an inner subprogram, for example a method inside a class defined inside the program, symbol definitions are lost. In addition, symbol definitions are lost for the inner subprogram. In dwarf2read.c, it appears that read_func_scope is called recursively to process the inner subprogram, and this recursive call does not correctly restore local_symbols or list_in_scope. "Fixing" this gets symbols for the outer function, but the inner still has no symbols. Release: 5.2.1.0.90_2002-09-04-cvs Environment: All environments, I believe, using dwarf2. How-To-Repeat: gcc bar.C -o bar -ggdb -O0 gdb bar br main run p rc step into inner p innerrc
Responsible-Changed-From-To: unassigned->jimb Responsible-Changed-Why: I'll take care of this one.
The outer variable works fine with gdb 6.8. The problem with the inner variable is actually a gcc debug info regression: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27574 I tried a gcc that has this fixed, and it all worked fine. So, I'm closing this.