Bug 476432 - [services] GDB version comparison fails for GDB 7.10
Summary: [services] GDB version comparison fails for GDB 7.10
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.8.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 8.8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-02 08:31 EDT by Marc Khouzam CLA
Modified: 2015-09-03 21:02 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2015-09-02 08:31:38 EDT
When running a debug session with GDB < 7.10, the Multicore Visualizer no longer displays and the following error can be seen in the logs:

456,709 53-info-os cpus
456,709 &"warning: Empty data returned by target.  Wrong osdata type?\n"
456,710 53^error,msg="Can not fetch data now."

-info-os cpus is only available with GDB 7.10, but we seem to be using it with older GDBs.  The reason is that in GdbDebugServicesFactory, we do a string comparison with "7.10" but this is not good because "7.10" < "7.9" as a string.  So, the GDBHardwareAndOS_7_10 service version gets instantiated by mistake.

We should be comparing as integers.

We didn't notice this before because GdbDebugServicesFactory.GDB_7_10_VERSION used to be "7.9.50" until recently.
Comment 1 Marc Khouzam CLA 2015-09-02 09:11:48 EDT
It turns out the problem is worse than we originally thought.

"7.10" < "7.2" when doing string comparison.  Therefore, CDT thinks that GDB 7.10 is actually a version older than 7.2 and turns off a bunch of things, like multi-process, dynamic-printf, console synchronization, and every other feature that came in with GDB >= 7.2.
Comment 2 Eclipse Genie CLA 2015-09-02 11:11:51 EDT
New Gerrit change created: https://git.eclipse.org/r/55107
Comment 3 Eclipse Genie CLA 2015-09-02 11:19:45 EDT
New Gerrit change created: https://git.eclipse.org/r/55109
Comment 5 Eclipse Genie CLA 2015-09-02 13:27:06 EDT
New Gerrit change created: https://git.eclipse.org/r/55122
Comment 7 Eclipse Genie CLA 2015-09-02 14:04:46 EDT
New Gerrit change created: https://git.eclipse.org/r/55123
Comment 10 Marc Khouzam CLA 2015-09-03 21:02:52 EDT
Fixed in 8_8 and master