Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2011-09-01 13:02:28 +0000
committerMarc Khouzam2011-09-01 13:02:28 +0000
commit80f8e653dde2bb5363e6dce989a26f85c0512aa4 (patch)
tree126a4f503b00195614921933e558d318c5d3b098
parent9a2af849799f34b984a6f19c84e02571202a8fb7 (diff)
downloadorg.eclipse.cdt-80f8e653dde2bb5363e6dce989a26f85c0512aa4.tar.gz
org.eclipse.cdt-80f8e653dde2bb5363e6dce989a26f85c0512aa4.tar.xz
org.eclipse.cdt-80f8e653dde2bb5363e6dce989a26f85c0512aa4.zip
Bug 356463: Wrong label in thread filter for programs compiled without pthreads
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java
index 3b4ae72dd26..22cbc9cbfe5 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 QNX Software Systems and others.
+ * Copyright (c) 2004, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* QNX Software Systems - Initial API and implementation
+ * Marc Khouzam (Ericsson) - Check for a null threadId (Bug 356463)
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.internal.ui.breakpoints;
@@ -474,7 +475,15 @@ public class GdbThreadFilterEditor {
new DataRequestMonitor<IThreadDMData>(ImmediateExecutor.getInstance(), rm) {
@Override
public void handleSuccess() {
- rm.setData(getData().getName());
+ final StringBuilder builder = new StringBuilder(getData().getName());
+ String containerId = getData().getId();
+ if (containerId != null) {
+ builder.append(" ["); //$NON-NLS-1$
+ builder.append(containerId);
+ builder.append("]"); //$NON-NLS-1$
+ }
+
+ rm.setData(builder.toString());
rm.done();
}
});
@@ -524,8 +533,14 @@ public class GdbThreadFilterEditor {
builder.append("["); //$NON-NLS-1$
builder.append(((IMIExecutionDMContext)thread).getThreadId());
builder.append("] "); //$NON-NLS-1$
- builder.append(getData().getId());
- builder.append(getData().getName());
+ String threadId = getData().getId();
+ if (threadId != null) {
+ builder.append(threadId);
+ }
+ String threadName = getData().getName();
+ if (threadName != null) {
+ builder.append(threadName);
+ }
rm.setData(builder.toString());
rm.done();

Back to the top