Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358262 - DwarfDebugInfoProvider#filterOutLocalVariables filters global rather than local variables
Summary: DwarfDebugInfoProvider#filterOutLocalVariables filters global rather than loc...
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-edc (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ken Ryall CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 11:27 EDT by Daniel Thomas CLA
Modified: 2019-12-30 18:39 EST (History)
2 users (show)

See Also:


Attachments
One line fix to fix this -> use IModuleScope instead (1.30 KB, patch)
2011-09-20 11:28 EDT, Daniel Thomas CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Thomas CLA 2011-09-20 11:27:46 EDT
Build Identifier: 

In f7c4790c134d0cdc30cdbe8d2a016bf27cd25528 changes to DwarfDebugInfoProvider: the adding of the filterOutLocalVariables(List<IVariable> variables) method and the using of it to remove variables from the result of getVariablesByName(String name, boolean globalsOnly) causes a regression in that it removes all global variables and leaves most local ones - it has the opposite behaviour to that which was intended.
Global variables have their scope as a IModuleScope and the test removes all variables which do not have their scope a ICompileUnit scope.
Changing this to IModuleScope fixes this.

Reproducible: Always
Comment 1 Daniel Thomas CLA 2011-09-20 11:28:19 EDT
Created attachment 203693 [details]
One line fix to fix this -> use IModuleScope instead
Comment 2 Kirk Beitz CLA 2011-09-21 16:36:25 EDT
daniel, i hate to tell you discovered something we already have locally.

we actually filter for both ICompileUnitScope & IModuleScope now, and i think we have the list of variables we want.

the change will be in our next merge … though we have some other priorities at the moment.
Comment 3 Jonah Graham CLA 2019-12-30 18:39:30 EST
(this is part of a batch change)

The Eclipse CDT EDC (https://wiki.eclipse.org/CDT/cdt-debug-edc) is now obsolete and has not had any active development since 2011. Therefore the still open bugs are being marked as wontfix.

The git repo for the project still exists for posterity at https://git.eclipse.org/c/cdt/org.eclipse.cdt.edc.git/