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

2004-10-28 Alain Magloire

Add ICDIValue.getType() and ICDIExpression.geType() new methods.
This commit is contained in:
Alain Magloire 2004-10-28 17:08:54 +00:00
parent 28848655d5
commit dc0936d60d
27 changed files with 196 additions and 148 deletions

View file

@ -1,3 +1,6 @@
2004-10-28 Alain Magloire
Add ICDIValue.getType() and ICDIExpression.geType() new methods.
2004-10-26 Alain Magloire
Remove ICDIMemoryManager in CDI
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java

View file

@ -185,7 +185,7 @@ public class SourceManager extends Manager {
public void update(Target target) throws CDIException {
}
public Type getType(VariableObject vo, String name) throws CDIException {
public Type getType(ICDIStackFrame frame, String name) throws CDIException {
if (name == null) {
name = new String();
}
@ -203,21 +203,21 @@ public class SourceManager extends Manager {
switch(gdbType.getType()) {
case GDBType.ARRAY:
int d = ((GDBDerivedType)gdbType).getDimension();
aType = new ArrayType(vo, gdbType.toString(), d);
aType = new ArrayType(frame, gdbType.toString(), d);
break;
case GDBType.FUNCTION:
aType = new FunctionType(vo, gdbType.toString());
aType = new FunctionType(frame, gdbType.toString());
break;
case GDBType.POINTER:
aType = new PointerType(vo, gdbType.toString());
aType = new PointerType(frame, gdbType.toString());
break;
case GDBType.REFERENCE:
aType = new ReferenceType(vo, gdbType.toString());
aType = new ReferenceType(frame, gdbType.toString());
break;
}
gdbType = ((GDBDerivedType)gdbType).getChild();
} else {
aType = toCDIType(vo, gdbType.toString());
aType = toCDIType(frame, gdbType.toString());
gdbType = null;
}
if (type instanceof DerivedType) {
@ -235,7 +235,7 @@ public class SourceManager extends Manager {
throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$
}
Type toCDIType(VariableObject vo, String name) throws CDIException {
Type toCDIType(ICDIStackFrame frame, String name) throws CDIException {
// Check the derived types and agregate types
if (name == null) {
name = new String();
@ -244,50 +244,50 @@ public class SourceManager extends Manager {
// Check the primitives.
if (typename.equals("char")) { //$NON-NLS-1$
return new CharType(vo, typename);
return new CharType(frame, typename);
} else if (typename.equals("wchar_t")) { //$NON-NLS-1$
return new WCharType(vo, typename);
return new WCharType(frame, typename);
} else if (typename.equals("short")) { //$NON-NLS-1$
return new ShortType(vo, typename);
return new ShortType(frame, typename);
} else if (typename.equals("int")) { //$NON-NLS-1$
return new IntType(vo, typename);
return new IntType(frame, typename);
} else if (typename.equals("long")) { //$NON-NLS-1$
return new LongType(vo, typename);
return new LongType(frame, typename);
} else if (typename.equals("unsigned")) { //$NON-NLS-1$
return new IntType(vo, typename, true);
return new IntType(frame, typename, true);
} else if (typename.equals("signed")) { //$NON-NLS-1$
return new IntType(vo, typename);
return new IntType(frame, typename);
} else if (typename.equals("bool")) { //$NON-NLS-1$
return new BoolType(vo, typename);
return new BoolType(frame, typename);
} else if (typename.equals("_Bool")) { //$NON-NLS-1$
return new BoolType(vo, typename);
return new BoolType(frame, typename);
} else if (typename.equals("float")) { //$NON-NLS-1$
return new FloatType(vo, typename);
return new FloatType(frame, typename);
} else if (typename.equals("double")) { //$NON-NLS-1$
return new DoubleType(vo, typename);
return new DoubleType(frame, typename);
} else if (typename.equals("void")) { //$NON-NLS-1$
return new VoidType(vo, typename);
return new VoidType(frame, typename);
} else if (typename.equals("enum")) { //$NON-NLS-1$
return new EnumType(vo, typename);
return new EnumType(frame, typename);
} else if (typename.equals("union")) { //$NON-NLS-1$
return new StructType(vo, typename);
return new StructType(frame, typename);
} else if (typename.equals("struct")) { //$NON-NLS-1$
return new StructType(vo, typename);
return new StructType(frame, typename);
} else if (typename.equals("class")) { //$NON-NLS-1$
return new StructType(vo, typename);
return new StructType(frame, typename);
}
// GDB has some special types for int
if (typename.equals("int8_t")) { //$NON-NLS-1$
return new CharType(vo, typename);
return new CharType(frame, typename);
} else if (typename.equals("int16_t")) { //$NON-NLS-1$
return new ShortType(vo, typename);
return new ShortType(frame, typename);
} else if (typename.equals("int32_t")) { //$NON-NLS-1$
return new LongType(vo, typename);
return new LongType(frame, typename);
} else if (typename.equals("int64_t")) { //$NON-NLS-1$
return new LongLongType(vo, typename);
return new LongLongType(frame, typename);
} else if (typename.equals("int128_t")) { //$NON-NLS-1$
return new IntType(vo, typename);
return new IntType(frame, typename); // ????
}
@ -320,27 +320,27 @@ public class SourceManager extends Manager {
boolean isEnum = first.equals("enum"); //$NON-NLS-1$
if (isChar && (isSigned || isUnsigned)) {
return new CharType(vo, typename, isUnsigned);
return new CharType(frame, typename, isUnsigned);
} else if (isShort && (isSigned || isUnsigned)) {
return new ShortType(vo, typename, isUnsigned);
return new ShortType(frame, typename, isUnsigned);
} else if (isInt && (isSigned || isUnsigned)) {
return new IntType(vo, typename, isUnsigned);
return new IntType(frame, typename, isUnsigned);
} else if (isLong && (isInt || isSigned || isUnsigned)) {
return new LongType(vo, typename, isUnsigned);
return new LongType(frame, typename, isUnsigned);
} else if (isLongLong) {
return new LongLongType(vo, typename);
return new LongLongType(frame, typename);
} else if (isDouble && (isLong || isComplex || isImaginery)) {
return new DoubleType(vo, typename, isComplex, isImaginery, isLong);
return new DoubleType(frame, typename, isComplex, isImaginery, isLong);
} else if (isFloat && (isComplex || isImaginery)) {
return new FloatType(vo, typename, isComplex, isImaginery);
return new FloatType(frame, typename, isComplex, isImaginery);
} else if (isStruct) {
return new StructType(vo, typename);
return new StructType(frame, typename);
} else if (isClass) {
return new StructType(vo, typename);
return new StructType(frame, typename);
} else if (isUnion) {
return new StructType(vo, typename);
return new StructType(frame, typename);
} else if (isEnum) {
return new EnumType(vo, typename);
return new EnumType(frame, typename);
}
} else if (count == 3) {
// ISOC allows permutation. replace short by: long or short
@ -368,13 +368,13 @@ public class SourceManager extends Manager {
if (isShort && isInt && (isSigned || unSigned)) {
return new ShortType(vo, typename, unSigned);
return new ShortType(frame, typename, unSigned);
} else if (isLong && isInt && (isSigned || unSigned)) {
return new LongType(vo, typename, unSigned);
return new LongType(frame, typename, unSigned);
} else if (isLongLong && (isSigned || unSigned)) {
return new LongLongType(vo, typename, unSigned);
return new LongLongType(frame, typename, unSigned);
} else if (isDouble && isLong && (isComplex || isImaginery)) {
return new DoubleType(vo, typename, isComplex, isImaginery, isLong);
return new DoubleType(frame, typename, isComplex, isImaginery, isLong);
}
} else if (count == 4) {
// ISOC allows permutation:
@ -394,7 +394,7 @@ public class SourceManager extends Manager {
|| (third.equals("long") && fourth.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$
if (isLongLong && isInt && (isSigned || unSigned)) {
return new LongLongType(vo, typename, unSigned);
return new LongLongType(frame, typename, unSigned);
}
}
throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$
@ -425,10 +425,9 @@ public class SourceManager extends Manager {
}
}
public String getTypeName(VariableObject vo, String variable) throws CDIException {
public String getTypeName(ICDIStackFrame frame, String variable) throws CDIException {
Session session = (Session)getSession();
ICDIStackFrame frame = vo.getStackFrame();
Target target = (Target)vo.getTarget();
Target target = (Target)frame.getTarget();
ICDIThread currentThread = null;
ICDIStackFrame currentFrame = null;
if (frame != null) {

View file

@ -15,11 +15,15 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
import org.eclipse.cdt.debug.mi.core.MIException;
import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
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.type.IncompleteType;
import org.eclipse.cdt.debug.mi.core.cdi.model.type.Type;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIVarCreate;
import org.eclipse.cdt.debug.mi.core.command.MIVarDelete;
@ -35,6 +39,7 @@ public class Expression extends CObject implements ICDIExpression {
private int id;
String fExpression;
Variable fVariable;
Type fType;
public Expression(Target target, String ex) {
super(target);
@ -60,6 +65,41 @@ public class Expression extends CObject implements ICDIExpression {
return false;
}
/**
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariable#getType()
*/
public ICDIType getType(ICDIStackFrame frame) throws CDIException {
Type type = null;
Target target = (Target)getTarget();
Session session = (Session) (target.getSession());
SourceManager sourceMgr = session.getSourceManager();
String nametype = sourceMgr.getTypeName(frame, getExpressionText());
try {
type = sourceMgr.getType(frame, nametype);
} catch (CDIException e) {
// Try with ptype.
try {
String ptype = sourceMgr.getDetailTypeName(frame, nametype);
type = sourceMgr.getType(frame, ptype);
} catch (CDIException ex) {
// Some version of gdb does not work with 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, getExpressionText());
type = sourceMgr.getType(frame, ptype);
} catch (CDIException e2) {
// give up.
}
}
}
if (type == null) {
type = new IncompleteType(frame, nametype);
}
return type;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIExpression#getValue(org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame)
*/

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.mi.core.cdi.model;
import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
import org.eclipse.cdt.debug.mi.core.MIException;
import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
@ -99,4 +100,11 @@ public class Value extends CObject implements ICDIValue {
return variable.getChildren();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIValue#getType()
*/
public ICDIType getType() throws CDIException {
return variable.getType();
}
}

View file

@ -167,28 +167,28 @@ public class VariableObject extends CObject implements ICDIVariableObject {
frame = target.getCurrentThread().getCurrentStackFrame();
}
SourceManager sourceMgr = session.getSourceManager();
String nametype = sourceMgr.getTypeName(this, getQualifiedName());
String nametype = sourceMgr.getTypeName(frame, getQualifiedName());
try {
type = sourceMgr.getType(this, nametype);
type = sourceMgr.getType(frame, nametype);
} catch (CDIException e) {
// Try with ptype.
try {
String ptype = sourceMgr.getDetailTypeName(frame, nametype);
type = sourceMgr.getType(this, ptype);
type = sourceMgr.getType(frame, 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(this, ptype);
type = sourceMgr.getType(frame, ptype);
} catch (CDIException e2) {
// give up.
}
}
}
if (type == null) {
type = new IncompleteType(this, nametype);
type = new IncompleteType(frame, nametype);
}
}
return type;

View file

@ -11,14 +11,14 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIAggregateType;
import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject;
/**
*/
public abstract class AggregateType extends Type implements ICDIAggregateType {
public AggregateType(VariableObject vo, String typename) {
super(vo, typename);
public AggregateType(ICDIStackFrame frame, String typename) {
super(frame, typename);
}
}

View file

@ -11,9 +11,9 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
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.VariableObject;
/**
*/
@ -24,8 +24,8 @@ public class ArrayType extends DerivedType implements ICDIArrayType {
/**
* @param typename
*/
public ArrayType(VariableObject vo, String typename,int dim) {
super(vo, typename);
public ArrayType(ICDIStackFrame frame, String typename,int dim) {
super(frame, typename);
dimension = dim;
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIBoolType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public BoolType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public BoolType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public BoolType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDICharType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public CharType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public CharType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public CharType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}

View file

@ -12,12 +12,12 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDerivedType;
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;
/**
*/
@ -25,8 +25,8 @@ public abstract class DerivedType extends Type implements ICDIDerivedType {
ICDIType derivedType;
public DerivedType(VariableObject vo, String typename) {
super(vo, typename);
public DerivedType(ICDIStackFrame frame, String typename) {
super(frame, typename);
}
public void setComponentType(ICDIType dtype) {
@ -38,17 +38,17 @@ public abstract class DerivedType extends Type implements ICDIDerivedType {
Session session = (Session)target.getSession();
SourceManager sourceMgr = session.getSourceManager();
try {
derivedType = sourceMgr.getType(getVariableObject(), name);
derivedType = sourceMgr.getType(getStackFrame(), name);
} catch (CDIException e) {
// Try after ptype.
try {
String ptype = sourceMgr.getDetailTypeName(getVariableObject().getStackFrame(), name);
derivedType = sourceMgr.getType(getVariableObject(), ptype);
String ptype = sourceMgr.getDetailTypeName(getStackFrame(), name);
derivedType = sourceMgr.getType(getStackFrame(), ptype);
} catch (CDIException ex) {
}
}
if (derivedType == null) {
derivedType = new IncompleteType(getVariableObject(), name);
derivedType = new IncompleteType(getStackFrame(), name);
}
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIDoubleType;
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(VariableObject vo, String typename) {
this(vo, typename, false, false, false);
public DoubleType(ICDIStackFrame frame, String typename) {
this(frame, typename, false, false, false);
}
public DoubleType(VariableObject vo, String typename, boolean isComplex, boolean isImg, boolean isLong) {
super(vo, typename, isComplex, isImg, isLong);
public DoubleType(ICDIStackFrame frame, String typename, boolean isComplex, boolean isImg, boolean isLong) {
super(frame, typename, isComplex, isImg, isLong);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIEnumType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public EnumType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public EnumType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public EnumType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatType;
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(VariableObject vo, String typename) {
this(vo, typename, false, false);
public FloatType(ICDIStackFrame frame, String typename) {
this(frame, typename, false, false);
}
public FloatType(VariableObject vo, String typename, boolean isComplex, boolean isImg) {
super(vo, typename, isComplex, isImg, false);
public FloatType(ICDIStackFrame frame, String typename, boolean isComplex, boolean isImg) {
super(frame, typename, isComplex, isImg, false);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFloatingPointType;
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(VariableObject vo, String typename, boolean comp, boolean img, boolean l) {
super(vo, typename);
public FloatingPointType(ICDIStackFrame frame, String typename, boolean comp, boolean img, boolean l) {
super(frame, typename);
complex = comp;
imaginary = img;
islong = l;

View file

@ -11,9 +11,9 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
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.VariableObject;
/**
*/
@ -21,8 +21,8 @@ public class FunctionType extends DerivedType implements ICDIFunctionType {
String params = ""; //$NON-NLS-1$
public FunctionType(VariableObject vo, String typename) {
super(vo, typename);
public FunctionType(ICDIStackFrame frame, String typename) {
super(frame, typename);
}
/* (non-Javadoc)

View file

@ -11,9 +11,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
/**
*/
@ -22,8 +20,8 @@ public class IncompleteType extends Type {
/**
* @param name
*/
public IncompleteType(VariableObject vo, String name) {
super(vo, name);
public IncompleteType(ICDIStackFrame frame, String name) {
super(frame, name);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public IntType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public IntType(VariableObject vo, String typename, boolean isUnsigned) {
super(vo, typename, isUnsigned);
public IntType(ICDIStackFrame frame, String typename, boolean isUnsigned) {
super(frame, typename, isUnsigned);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIIntegralType;
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(VariableObject vo, String typename, boolean isUnsigned) {
super(vo, typename);
public IntegralType(ICDIStackFrame frame, String typename, boolean isUnsigned) {
super(frame, typename);
unSigned = isUnsigned;
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongLongType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public LongLongType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public LongLongType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public LongLongType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDILongType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public LongType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public LongType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public LongType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}

View file

@ -11,16 +11,16 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
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.VariableObject;
/**
*/
public class PointerType extends DerivedType implements ICDIPointerType {
public PointerType(VariableObject vo, String typename) {
super(vo, typename);
public PointerType(ICDIStackFrame frame, String typename) {
super(frame, typename);
}
/* (non-Javadoc)

View file

@ -11,9 +11,9 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
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.VariableObject;
/**
*/
@ -22,8 +22,8 @@ public class ReferenceType extends DerivedType implements ICDIReferenceType {
/**
* @param name
*/
public ReferenceType(VariableObject vo, String name) {
super(vo, name);
public ReferenceType(ICDIStackFrame frame, String name) {
super(frame, name);
}
/* (non-Javadoc)

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIShortType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public ShortType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public ShortType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public ShortType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType;
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(VariableObject vo, String typename) {
super(vo, typename);
public StructType(ICDIStackFrame frame, String typename) {
super(frame, typename);
}

View file

@ -11,27 +11,27 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
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;
ICDIStackFrame fStackFrame;
String typename;
String detailName;
public Type(VariableObject vo, String name) {
super((Target)vo.getTarget());
public Type(ICDIStackFrame frame, String name) {
super((Target)frame.getTarget());
typename = name;
fVariableObject = vo;
fStackFrame = frame;
}
public VariableObject getVariableObject() {
return fVariableObject;
public ICDIStackFrame getStackFrame() {
return fStackFrame;
}
/* (non-Javadoc)

View file

@ -11,14 +11,14 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIVoidType;
import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject;
/**
*/
public class VoidType extends Type implements ICDIVoidType {
public VoidType(VariableObject vo, String typename) {
super(vo, typename);
public VoidType(ICDIStackFrame frame, String typename) {
super(frame, typename);
}
}

View file

@ -12,8 +12,8 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharType;
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(VariableObject vo, String typename) {
this(vo, typename, false);
public WCharType(ICDIStackFrame frame, String typename) {
this(frame, typename, false);
}
public WCharType(VariableObject vo, String typename, boolean usigned) {
super(vo, typename, usigned);
public WCharType(ICDIStackFrame frame, String typename, boolean usigned) {
super(frame, typename, usigned);
}
}