diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java index d889776ddcd..8eaf847bc40 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java @@ -777,14 +777,18 @@ public class GDBProcesses_7_0 extends AbstractDsfService if (thread.getThreadId().equals(threadDmc.getId())) { String id = ""; //$NON-NLS-1$ if (thread.getOsId() != null) { - id = thread.getOsId() + " "; //$NON-NLS-1$ + id = thread.getOsId(); } // append thread details (if any) to the thread ID // as for GDB 6.x with CLIInfoThreadsInfo#getOsId() final String details = thread.getDetails(); if (details != null && details.length() > 0) { + if (!id.isEmpty()) id += " "; //$NON-NLS-1$ id += "(" + details + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } + // We must indicate and empty id by using null + if (id.isEmpty()) id = null; + threadData = new MIThreadDMData("", id); //$NON-NLS-1$ } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_1.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_1.java index f52071c3a41..91eb38e38c2 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_1.java @@ -178,14 +178,17 @@ public class GDBProcesses_7_1 extends GDBProcesses_7_0 { if (thread.getThreadId().equals(threadDmc.getId())) { String id = ""; //$NON-NLS-1$ if (thread.getOsId() != null) { - id = thread.getOsId() + " "; //$NON-NLS-1$ + id = thread.getOsId(); } // append thread details (if any) to the thread ID // as for GDB 6.x with CLIInfoThreadsInfo#getOsId() final String details = thread.getDetails(); if (details != null && details.length() > 0) { + if (!id.isEmpty()) id += " "; //$NON-NLS-1$ id += "(" + details + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } + // We must indicate and empty id by using null + if (id.isEmpty()) id = null; String core = thread.getCore(); threadData = new MIThreadDMData_7_1("", id, //$NON-NLS-1$