Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328302 - EDC Registers service should use DMContexts.getAncestorOfType to find supported type
Summary: EDC Registers service should use DMContexts.getAncestorOfType to find support...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-edc (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ken Ryall CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 19:08 EDT by John Cortell CLA
Modified: 2010-10-22 00:30 EDT (History)
1 user (show)

See Also:
ken.ryall: review+


Attachments
Fix (3.08 KB, patch)
2010-10-20 19:11 EDT, John Cortell CLA
john.cortell: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Cortell CLA 2010-10-20 19:08:32 EDT
The EDC implementation of IRegisters.getRegisterGroups() and IRegisters.getRegisters() are successful when they are given a view model context (CompositeDMVMContext) but ironically are unsuccessful when they are given the actual context that they support. I.e., if you pass them a thread or stack frame context, they fail to provide the register/groups for that context. The reason is that they assume they are getting one of these composite view-model contexts and simply iterate over its parents. The right way to handle both scenarios is to use DMContexts.getAncestorOfType() to search for the supported context.
Comment 1 John Cortell CLA 2010-10-20 19:11:49 EDT
Created attachment 181346 [details]
Fix

Committed to HEAD. Ken, please review.
Comment 2 John Cortell CLA 2010-10-20 19:12:28 EDT
Fixed
Comment 3 CDT Genie CLA 2010-10-20 19:23:01 EDT
*** cdt cvs genie on behalf of jcortell ***
Bug 328302: EDC Registers service should use DMContexts.getAncestorOfType to find supported type

[*] Registers.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc/src/org/eclipse/cdt/debug/edc/services/Registers.java?root=Tools_Project&r1=1.14&r2=1.15
Comment 4 Ken Ryall CLA 2010-10-22 00:30:08 EDT
Thanks, look good.