Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2011-09-01 13:02:28 +0000
committerMarc Khouzam2011-09-01 13:07:31 +0000
commit9cf02934609bb771a4d145ebee59bbac236f9be7 (patch)
tree1c45efa38e12d2c407d72882ba7a91d8c94d0d65
parent98c81cf0fb7757780ea10161faa5b384792eea3e (diff)
downloadorg.eclipse.cdt-9cf02934609bb771a4d145ebee59bbac236f9be7.tar.gz
org.eclipse.cdt-9cf02934609bb771a4d145ebee59bbac236f9be7.tar.xz
org.eclipse.cdt-9cf02934609bb771a4d145ebee59bbac236f9be7.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