From 0ecc8782a40d402087b10c8b9d58c682a3b8c4bb Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Mon, 22 Sep 2008 14:16:36 +0000 Subject: [PATCH] - sometime gdb sends "empty" child name for anonymous unions for example, in this case expressions like foo..bar can be created, now will create foo instead of foo. in case of union --- .../cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java index fd09dee99d9..3f650ccf8b2 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java @@ -280,7 +280,9 @@ public abstract class Variable extends VariableDescriptor implements ICDIVariabl fn = "*(" + fn + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } } else if (t instanceof ICDIStructType || t instanceof IncompleteType) { - fn = "(" + fn + ")." + childName; //$NON-NLS-1$ //$NON-NLS-2$ + if (childName.length()>0) { + fn = "(" + fn + ")." + childName; //$NON-NLS-1$ //$NON-NLS-2$ + } } Variable v = createVariable((Target)getTarget(), (Thread)getThread(), (StackFrame)getStackFrame(), childName, fn, getPosition(), getStackDepth(), vars[i]);