Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2013-07-09 15:10:50 +0000
committerMikhail Khodjaiants2014-01-13 19:28:14 +0000
commit6891ce8e0feaf8393c326643cdcd1d9149940a0a (patch)
tree6813b3ef0f05be7167d57d630c3c843cc36c7321
parent6873bc90019a3dfbdd0df3e520e38293e3ecf165 (diff)
downloadorg.eclipse.cdt-6891ce8e0feaf8393c326643cdcd1d9149940a0a.tar.gz
org.eclipse.cdt-6891ce8e0feaf8393c326643cdcd1d9149940a0a.tar.xz
org.eclipse.cdt-6891ce8e0feaf8393c326643cdcd1d9149940a0a.zip
Bug 412547 - Selection is lost when stepping over "pthread_create" for
gdbserver sessions Change-Id: Ide875ba350dfd3e17579519360999b82c572c355 Reviewed-on: https://git.eclipse.org/r/14415 Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java
index 788291998b3..faa4597bfe1 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThreadInfoInfo.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.cdt.dsf.mi.service.command.output;
+import java.util.Arrays;
+import java.util.Comparator;
/**
@@ -143,6 +145,18 @@ public class MIThreadInfoInfo extends MIInfo {
for (int i = 0; i < values.length; i++) {
threadList[i] = MIThread.parse((MITuple) values[i]);
}
+ Arrays.sort(threadList, new Comparator<MIThread>() {
+
+ @Override
+ public int compare(MIThread o1, MIThread o2) {
+ try {
+ return Integer.parseInt(o1.getThreadId()) - Integer.parseInt(o2.getThreadId());
+ }
+ catch(NumberFormatException e) {
+ return 0;
+ }
+ }
+ });
return threadList;
}
}

Back to the top