1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

- 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

This commit is contained in:
Alena Laskavaia 2008-09-22 14:16:36 +00:00
parent 333f92bbe5
commit 0ecc8782a4

View file

@ -280,7 +280,9 @@ public abstract class Variable extends VariableDescriptor implements ICDIVariabl
fn = "*(" + fn + ")"; //$NON-NLS-1$ //$NON-NLS-2$ fn = "*(" + fn + ")"; //$NON-NLS-1$ //$NON-NLS-2$
} }
} else if (t instanceof ICDIStructType || t instanceof IncompleteType) { } 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(), Variable v = createVariable((Target)getTarget(), (Thread)getThread(), (StackFrame)getStackFrame(),
childName, fn, getPosition(), getStackDepth(), vars[i]); childName, fn, getPosition(), getStackDepth(), vars[i]);