diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 2fe93230d68..999cf2a5d4e 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,7 @@ +2004-09-15 Alain Magloire + + Chang Type to take a VariableObject. + 2004-09-15 Alain Magloire The correct thread was not set. diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java index e4d70f2d627..0b878b2a2d6 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java @@ -17,7 +17,6 @@ import org.eclipse.cdt.debug.core.cdi.ICDISourceManager; import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction; import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction; import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame; -import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; import org.eclipse.cdt.debug.core.cdi.model.ICDIThread; import org.eclipse.cdt.debug.mi.core.GDBTypeParser; import org.eclipse.cdt.debug.mi.core.MIException; @@ -26,9 +25,8 @@ import org.eclipse.cdt.debug.mi.core.GDBTypeParser.GDBDerivedType; import org.eclipse.cdt.debug.mi.core.GDBTypeParser.GDBType; import org.eclipse.cdt.debug.mi.core.cdi.model.Instruction; import org.eclipse.cdt.debug.mi.core.cdi.model.MixedInstruction; -import org.eclipse.cdt.debug.mi.core.cdi.model.StackFrame; import org.eclipse.cdt.debug.mi.core.cdi.model.Target; -import org.eclipse.cdt.debug.mi.core.cdi.model.Thread; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; import org.eclipse.cdt.debug.mi.core.cdi.model.type.ArrayType; import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolType; import org.eclipse.cdt.debug.mi.core.cdi.model.type.CharType; @@ -242,7 +240,7 @@ public class SourceManager extends Manager implements ICDISourceManager { public void update(Target target) throws CDIException { } - public Type getType(Target target, String name) throws CDIException { + public Type getType(VariableObject vo, String name) throws CDIException { if (name == null) { name = new String(); } @@ -260,21 +258,21 @@ public class SourceManager extends Manager implements ICDISourceManager { switch(gdbType.getType()) { case GDBType.ARRAY: int d = ((GDBDerivedType)gdbType).getDimension(); - aType = new ArrayType(target, gdbType.toString(), d); + aType = new ArrayType(vo, gdbType.toString(), d); break; case GDBType.FUNCTION: - aType = new FunctionType(target, gdbType.toString()); + aType = new FunctionType(vo, gdbType.toString()); break; case GDBType.POINTER: - aType = new PointerType(target, gdbType.toString()); + aType = new PointerType(vo, gdbType.toString()); break; case GDBType.REFERENCE: - aType = new ReferenceType(target, gdbType.toString()); + aType = new ReferenceType(vo, gdbType.toString()); break; } gdbType = ((GDBDerivedType)gdbType).getChild(); } else { - aType = toCDIType(target, gdbType.toString()); + aType = toCDIType(vo, gdbType.toString()); gdbType = null; } if (type instanceof DerivedType) { @@ -292,7 +290,7 @@ public class SourceManager extends Manager implements ICDISourceManager { throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$ } - Type toCDIType(Target target, String name) throws CDIException { + Type toCDIType(VariableObject vo, String name) throws CDIException { // Check the derived types and agregate types if (name == null) { name = new String(); @@ -301,50 +299,50 @@ public class SourceManager extends Manager implements ICDISourceManager { // Check the primitives. if (typename.equals("char")) { //$NON-NLS-1$ - return new CharType(target, typename); + return new CharType(vo, typename); } else if (typename.equals("wchar_t")) { //$NON-NLS-1$ - return new WCharType(target, typename); + return new WCharType(vo, typename); } else if (typename.equals("short")) { //$NON-NLS-1$ - return new ShortType(target, typename); + return new ShortType(vo, typename); } else if (typename.equals("int")) { //$NON-NLS-1$ - return new IntType(target, typename); + return new IntType(vo, typename); } else if (typename.equals("long")) { //$NON-NLS-1$ - return new LongType(target, typename); + return new LongType(vo, typename); } else if (typename.equals("unsigned")) { //$NON-NLS-1$ - return new IntType(target, typename, true); + return new IntType(vo, typename, true); } else if (typename.equals("signed")) { //$NON-NLS-1$ - return new IntType(target, typename); + return new IntType(vo, typename); } else if (typename.equals("bool")) { //$NON-NLS-1$ - return new BoolType(target, typename); + return new BoolType(vo, typename); } else if (typename.equals("_Bool")) { //$NON-NLS-1$ - return new BoolType(target, typename); + return new BoolType(vo, typename); } else if (typename.equals("float")) { //$NON-NLS-1$ - return new FloatType(target, typename); + return new FloatType(vo, typename); } else if (typename.equals("double")) { //$NON-NLS-1$ - return new DoubleType(target, typename); + return new DoubleType(vo, typename); } else if (typename.equals("void")) { //$NON-NLS-1$ - return new VoidType(target, typename); + return new VoidType(vo, typename); } else if (typename.equals("enum")) { //$NON-NLS-1$ - return new EnumType(target, typename); + return new EnumType(vo, typename); } else if (typename.equals("union")) { //$NON-NLS-1$ - return new StructType(target, typename); + return new StructType(vo, typename); } else if (typename.equals("struct")) { //$NON-NLS-1$ - return new StructType(target, typename); + return new StructType(vo, typename); } else if (typename.equals("class")) { //$NON-NLS-1$ - return new StructType(target, typename); + return new StructType(vo, typename); } // GDB has some special types for int if (typename.equals("int8_t")) { //$NON-NLS-1$ - return new CharType(target, typename); + return new CharType(vo, typename); } else if (typename.equals("int16_t")) { //$NON-NLS-1$ - return new ShortType(target, typename); + return new ShortType(vo, typename); } else if (typename.equals("int32_t")) { //$NON-NLS-1$ - return new LongType(target, typename); + return new LongType(vo, typename); } else if (typename.equals("int64_t")) { //$NON-NLS-1$ - return new IntType(target, typename); + return new IntType(vo, typename); } else if (typename.equals("int128_t")) { //$NON-NLS-1$ - return new IntType(target, typename); + return new IntType(vo, typename); } @@ -377,27 +375,27 @@ public class SourceManager extends Manager implements ICDISourceManager { boolean isEnum = first.equals("enum"); //$NON-NLS-1$ if (isChar && (isSigned || isUnsigned)) { - return new CharType(target, typename, isUnsigned); + return new CharType(vo, typename, isUnsigned); } else if (isShort && (isSigned || isUnsigned)) { - return new ShortType(target, typename, isUnsigned); + return new ShortType(vo, typename, isUnsigned); } else if (isInt && (isSigned || isUnsigned)) { - return new IntType(target, typename, isUnsigned); + return new IntType(vo, typename, isUnsigned); } else if (isLong && (isInt || isSigned || isUnsigned)) { - return new LongType(target, typename, isUnsigned); + return new LongType(vo, typename, isUnsigned); } else if (isLongLong) { - return new LongLongType(target, typename); + return new LongLongType(vo, typename); } else if (isDouble && (isLong || isComplex || isImaginery)) { - return new DoubleType(target, typename, isComplex, isImaginery, isLong); + return new DoubleType(vo, typename, isComplex, isImaginery, isLong); } else if (isFloat && (isComplex || isImaginery)) { - return new FloatType(target, typename, isComplex, isImaginery); + return new FloatType(vo, typename, isComplex, isImaginery); } else if (isStruct) { - return new StructType(target, typename); + return new StructType(vo, typename); } else if (isClass) { - return new StructType(target, typename); + return new StructType(vo, typename); } else if (isUnion) { - return new StructType(target, typename); + return new StructType(vo, typename); } else if (isEnum) { - return new EnumType(target, typename); + return new EnumType(vo, typename); } } else if (count == 3) { // ISOC allows permutation. replace short by: long or short @@ -425,13 +423,13 @@ public class SourceManager extends Manager implements ICDISourceManager { if (isShort && isInt && (isSigned || unSigned)) { - return new ShortType(target, typename, unSigned); + return new ShortType(vo, typename, unSigned); } else if (isLong && isInt && (isSigned || unSigned)) { - return new LongType(target, typename, unSigned); + return new LongType(vo, typename, unSigned); } else if (isLongLong && (isSigned || unSigned)) { - return new LongLongType(target, typename, unSigned); + return new LongLongType(vo, typename, unSigned); } else if (isDouble && isLong && (isComplex || isImaginery)) { - return new DoubleType(target, typename, isComplex, isImaginery, isLong); + return new DoubleType(vo, typename, isComplex, isImaginery, isLong); } } else if (count == 4) { // ISOC allows permutation: @@ -451,7 +449,7 @@ public class SourceManager extends Manager implements ICDISourceManager { || (third.equals("long") && fourth.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$ if (isLongLong && isInt && (isSigned || unSigned)) { - return new LongLongType(target, typename, unSigned); + return new LongLongType(vo, typename, unSigned); } } throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$ @@ -481,7 +479,8 @@ public class SourceManager extends Manager implements ICDISourceManager { } } - public String getTypeName(ICDIStackFrame frame, String variable) throws CDIException { + public String getTypeName(VariableObject vo, String variable) throws CDIException { + ICDIStackFrame frame = vo.getStackFrame(); Target target = (Target)frame.getTarget(); ICDIThread currentThread = target.getCurrentThread(); ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame(); diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java index d32f04f3a13..3a3b2dd4035 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/VariableObject.java @@ -164,28 +164,28 @@ public class VariableObject extends CObject implements ICDIVariableObject { ICDIStackFrame frame = getStackFrame(); Session session = (Session) (target.getSession()); SourceManager sourceMgr = (SourceManager) session.getSourceManager(); - String nametype = sourceMgr.getTypeName(frame, getQualifiedName()); + String nametype = sourceMgr.getTypeName(this, getQualifiedName()); try { - type = sourceMgr.getType(target, nametype); + type = sourceMgr.getType(this, nametype); } catch (CDIException e) { // Try with ptype. try { String ptype = sourceMgr.getDetailTypeName(frame, nametype); - type = sourceMgr.getType(target, ptype); + type = sourceMgr.getType(this, ptype); } catch (CDIException ex) { // Some version of gdb does not work woth the name of the class // ex: class data foo --> ptype data --> fails // ex: class data foo --> ptype foo --> succeed try { String ptype = sourceMgr.getDetailTypeName(frame, getQualifiedName()); - type = sourceMgr.getType(target, ptype); + type = sourceMgr.getType(this, ptype); } catch (CDIException e2) { // give up. } } } if (type == null) { - type = new IncompleteType(target, nametype); + type = new IncompleteType(this, nametype); } } return type; diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java index 566c226499b..7c09e24f608 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/AggregateType.java @@ -12,13 +12,13 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIAggregateType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ public abstract class AggregateType extends Type implements ICDIAggregateType { - public AggregateType(Target target, String typename) { - super(target, typename); + public AggregateType(VariableObject vo, String typename) { + super(vo, typename); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java index 5b63362e4e6..32fad855091 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayType.java @@ -13,7 +13,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayType; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -24,8 +24,8 @@ public class ArrayType extends DerivedType implements ICDIArrayType { /** * @param typename */ - public ArrayType(Target target, String typename,int dim) { - super(target, typename); + public ArrayType(VariableObject vo, String typename,int dim) { + super(vo, typename); dimension = dim; } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java index d258b1216f4..5a1c53a6957 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/BoolType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,12 +21,12 @@ public class BoolType extends IntegralType implements ICDIBoolType { /** * @param typename */ - public BoolType(Target target, String typename) { - this(target, typename, false); + public BoolType(VariableObject vo, String typename) { + this(vo, typename, false); } - public BoolType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public BoolType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java index 9575d2055e9..93a248624c3 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/CharType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class CharType extends IntegralType implements ICDICharType { /** * @param typename */ - public CharType(Target target, String typename) { - this(target, typename, false); + public CharType(VariableObject vo, String typename) { + this(vo, typename, false); } - public CharType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public CharType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java index 69f7acf0f49..97b1b353619 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DerivedType.java @@ -17,6 +17,7 @@ import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; import org.eclipse.cdt.debug.mi.core.cdi.Session; import org.eclipse.cdt.debug.mi.core.cdi.SourceManager; import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -24,8 +25,8 @@ public abstract class DerivedType extends Type implements ICDIDerivedType { ICDIType derivedType; - public DerivedType(Target target, String typename) { - super(target, typename); + public DerivedType(VariableObject vo, String typename) { + super(vo, typename); } public void setComponentType(ICDIType dtype) { @@ -37,19 +38,17 @@ public abstract class DerivedType extends Type implements ICDIDerivedType { Session session = (Session)(target.getSession()); SourceManager sourceMgr = (SourceManager)session.getSourceManager(); try { - derivedType = sourceMgr.getType(target, name); + derivedType = sourceMgr.getType(getVariableObject(), name); } catch (CDIException e) { // Try after ptype. try { - //String ptype = sourceMgr.getDetailTypeName(target, name); - // TODO: this type should be created with frames not targets. - String ptype = sourceMgr.getDetailTypeName(target.getCurrentThread().getCurrentStackFrame(), name); - derivedType = sourceMgr.getType(target, ptype); + String ptype = sourceMgr.getDetailTypeName(getVariableObject().getStackFrame(), name); + derivedType = sourceMgr.getType(getVariableObject(), ptype); } catch (CDIException ex) { } } if (derivedType == null) { - derivedType = new IncompleteType(target, name); + derivedType = new IncompleteType(getVariableObject(), name); } } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java index 483e1ec8196..47919a29a51 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/DoubleType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class DoubleType extends FloatingPointType implements ICDIDoubleType { /** * @param typename */ - public DoubleType(Target target, String typename) { - this(target, typename, false, false, false); + public DoubleType(VariableObject vo, String typename) { + this(vo, typename, false, false, false); } - public DoubleType(Target target, String typename, boolean isComplex, boolean isImg, boolean isLong) { - super(target, typename, isComplex, isImg, isLong); + public DoubleType(VariableObject vo, String typename, boolean isComplex, boolean isImg, boolean isLong) { + super(vo, typename, isComplex, isImg, isLong); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java index 0db2216899c..36ddc927ac8 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/EnumType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIEnumType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class EnumType extends IntegralType implements ICDIEnumType { /** * @param typename */ - public EnumType(Target target, String typename) { - this(target, typename, false); + public EnumType(VariableObject vo, String typename) { + this(vo, typename, false); } - public EnumType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public EnumType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java index f67a66311f7..06b3fa762a8 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class FloatType extends FloatingPointType implements ICDIFloatType { /** * @param typename */ - public FloatType(Target target, String typename) { - this(target, typename, false, false); + public FloatType(VariableObject vo, String typename) { + this(vo, typename, false, false); } - public FloatType(Target target, String typename, boolean isComplex, boolean isImg) { - super(target, typename, isComplex, isImg, false); + public FloatType(VariableObject vo, String typename, boolean isComplex, boolean isImg) { + super(vo, typename, isComplex, isImg, false); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java index cb4223cb80c..9c1fa1d56a6 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FloatingPointType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -22,8 +22,8 @@ public abstract class FloatingPointType extends Type implements ICDIFloatingPoin boolean imaginary; boolean islong; - public FloatingPointType(Target target, String typename, boolean comp, boolean img, boolean l) { - super(target, typename); + public FloatingPointType(VariableObject vo, String typename, boolean comp, boolean img, boolean l) { + super(vo, typename); complex = comp; imaginary = img; islong = l; diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java index 375e433fc3e..43b1fc2e5d8 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/FunctionType.java @@ -13,7 +13,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFunctionType; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,8 +21,8 @@ public class FunctionType extends DerivedType implements ICDIFunctionType { String params = ""; //$NON-NLS-1$ - public FunctionType(Target target, String typename) { - super(target, typename); + public FunctionType(VariableObject vo, String typename) { + super(vo, typename); } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java index db68c8e39fb..053b69538cc 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IncompleteType.java @@ -11,7 +11,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; @@ -22,8 +22,8 @@ public class IncompleteType extends Type { /** * @param name */ - public IncompleteType(Target target, String name) { - super(target, name); + public IncompleteType(VariableObject vo, String name) { + super(vo, name); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java index 0357aff9ef9..1dec16dacd7 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,12 +21,12 @@ public class IntType extends IntegralType implements ICDIIntType { /** * @param typename */ - public IntType(Target target, String typename) { - this(target, typename, false); + public IntType(VariableObject vo, String typename) { + this(vo, typename, false); } - public IntType(Target target, String typename, boolean isUnsigned) { - super(target, typename, isUnsigned); + public IntType(VariableObject vo, String typename, boolean isUnsigned) { + super(vo, typename, isUnsigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java index 8a68eb009b1..5fccd84497d 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/IntegralType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntegralType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -20,8 +20,8 @@ public abstract class IntegralType extends Type implements ICDIIntegralType { boolean unSigned; - public IntegralType(Target target, String typename, boolean isUnsigned) { - super(target, typename); + public IntegralType(VariableObject vo, String typename, boolean isUnsigned) { + super(vo, typename); unSigned = isUnsigned; } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java index 8abe43b767d..6061b3d0d50 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongLongType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class LongLongType extends IntegralType implements ICDILongLongType { /** * @param typename */ - public LongLongType(Target target, String typename) { - this(target, typename, false); + public LongLongType(VariableObject vo, String typename) { + this(vo, typename, false); } - public LongLongType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public LongLongType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java index 5c015d1ef19..6eb0a37320f 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/LongType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class LongType extends IntegralType implements ICDILongType { /** * @param typename */ - public LongType(Target target, String typename) { - this(target, typename, false); + public LongType(VariableObject vo, String typename) { + this(vo, typename, false); } - public LongType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public LongType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java index 68f1a9b8e1c..b302eac5ba1 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/PointerType.java @@ -13,14 +13,14 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerType; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ public class PointerType extends DerivedType implements ICDIPointerType { - public PointerType(Target target, String typename) { - super(target, typename); + public PointerType(VariableObject vo, String typename) { + super(vo, typename); } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java index 4d71c6fa02b..a228c22d7b6 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ReferenceType.java @@ -13,7 +13,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIReferenceType; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -22,8 +22,8 @@ public class ReferenceType extends DerivedType implements ICDIReferenceType { /** * @param name */ - public ReferenceType(Target target, String name) { - super(target, name); + public ReferenceType(VariableObject vo, String name) { + super(vo, name); } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java index e085f5cfb54..221de581e39 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ShortType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,11 +21,11 @@ public class ShortType extends IntegralType implements ICDIShortType { /** * @param typename */ - public ShortType(Target target, String typename) { - this(target, typename, false); + public ShortType(VariableObject vo, String typename) { + this(vo, typename, false); } - public ShortType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public ShortType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java index 4bf4730942a..c5b7d30f211 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/StructType.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -21,8 +21,8 @@ public class StructType extends AggregateType implements ICDIStructType { /** * @param typename */ - public StructType(Target target, String typename) { - super(target, typename); + public StructType(VariableObject vo, String typename) { + super(vo, typename); } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java index 1ee225567d0..bba47d16c57 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/Type.java @@ -14,17 +14,24 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; import org.eclipse.cdt.debug.mi.core.cdi.model.CObject; import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ public abstract class Type extends CObject implements ICDIType { + VariableObject fVariableObject; String typename; String detailName; - public Type(Target target, String name) { - super(target); + public Type(VariableObject vo, String name) { + super((Target)vo.getTarget()); typename = name; + fVariableObject = vo; + } + + public VariableObject getVariableObject() { + return fVariableObject; } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java index e520cc716d1..d02b3723fa0 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/VoidType.java @@ -12,13 +12,13 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIVoidType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ public class VoidType extends Type implements ICDIVoidType { - public VoidType(Target target, String typename) { - super(target, typename); + public VoidType(VariableObject vo, String typename) { + super(vo, typename); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java index 038692fe35a..bd7b4fe0f6a 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/WCharType.java @@ -13,7 +13,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model.type; import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharType; -import org.eclipse.cdt.debug.mi.core.cdi.model.Target; +import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject; /** */ @@ -22,11 +22,11 @@ public class WCharType extends IntegralType implements ICDIWCharType { /** * @param typename */ - public WCharType(Target target, String typename) { - this(target, typename, false); + public WCharType(VariableObject vo, String typename) { + this(vo, typename, false); } - public WCharType(Target target, String typename, boolean usigned) { - super(target, typename, usigned); + public WCharType(VariableObject vo, String typename, boolean usigned) { + super(vo, typename, usigned); } }