Community
Participate
Working Groups
Created attachment 176090 [details] fix that changes upper-bound test to be exclusive all but the end-of-function case context: typically, DWARF function scope will contain no variables (and only function parameters/arguments), and this is properly reflected in edc's FunctionScope#recurseGetScopedVariables(). the DWARF function scope will then typically contain a single child which is a LexicalScope encompassing the entire function (minus prolog/epilog), and which will contain any nested LexicalScope children in the function. fix in attached patch FunctionScope.11351.patch : [1] change to FunctionScope.cpp to compare only against " < 0 " instead of " <= 0 " so upper-bound check is non-inclusive [2] first change requires additional check to compare using " == 0 " when address at which to get scoped-variables is equal to the last address of the child scope when that child-scope's parent is the function-scope.
Committed to HEAD.
*** cdt cvs genie on behalf of kryall *** Bug 322051 - nested scoped variables visible on line after end of scope [*] FunctionScope.java 1.7 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc/src/org/eclipse/cdt/debug/edc/internal/symbols/FunctionScope.java?root=Tools_Project&r1=1.6&r2=1.7