Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328302

Summary: EDC Registers service should use DMContexts.getAncestorOfType to find supported type
Product: [Tools] CDT Reporter: John Cortell <john.cortell>
Component: cdt-debug-edcAssignee: Ken Ryall <ken.ryall>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0Flags: ken.ryall: review+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix john.cortell: iplog-

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.