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

Bug 434889

Summary: GDBHardwareAndOS#isAvailable() always returns false
Product: [Tools] CDT Reporter: Marc Dumais <marc.dumais>
Component: cdt-debug-dsf-gdbAssignee: Marc Dumais <marc.dumais>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: enhancement    
Priority: P3 CC: cdtdoug, pawel.1.piech, vladimir.prus
Version: 8.4.0   
Target Milestone: 8.5   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 407640    

Description Marc Dumais CLA 2014-05-14 14:14:42 EDT
Method IGDBHardwareAndOS2#isAvailable() is exactly what I need, to know whether the session has finished initializing and the service is ready to answer queries. 

It works as intended with GDB 7.5+ (implementation in GDBHardwareAndOS_7_5). However, for older GDBs, the default implementation (in the base class GDBHardwareAndOS) returns an hard-coded "false". 

It seems strange to have it this way, since all the logic behind the method is actually implemented in the base class.
Comment 1 Marc Dumais CLA 2014-05-14 14:27:50 EDT
Here is a patch. 

https://git.eclipse.org/r/26542

It just replaces the implementation of isAvailable() of GDBHardwareAndOS by that of GDBHardwareAndOS_7_5. Since the later extends the former, it will not change anything for GDB 7.5+. However it will permit using the useful information provided by this method with older GDBs.

I have confirmed that the OS resource view does not break, with this change, for GDB 7.5+. When using an older GDB it simply reports that the "OS resources are not available using your target abd GDB", which seems fine (i.e. the OS resources view was not relying on isAvailable() to always return false for older GDBs).
Comment 2 Marc Dumais CLA 2014-05-16 12:56:05 EDT
BTW, I see this as an enhancement, and so will not target the Luna release.