mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Change the constructor of Type to take variableObject
This commit is contained in:
parent
0c9232916e
commit
d081086a26
25 changed files with 152 additions and 143 deletions
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue