1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 11:55:40 +02:00

Change the constructor of Type to take variableObject

This commit is contained in:
Alain Magloire 2004-09-16 01:21:55 +00:00
parent 0c9232916e
commit d081086a26
25 changed files with 152 additions and 143 deletions

View file

@ -1,3 +1,7 @@
2004-09-15 Alain Magloire
Chang Type to take a VariableObject.
2004-09-15 Alain Magloire 2004-09-15 Alain Magloire
The correct thread was not set. The correct thread was not set.

View file

@ -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.ICDIInstruction;
import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction; 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.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread; import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
import org.eclipse.cdt.debug.mi.core.GDBTypeParser; import org.eclipse.cdt.debug.mi.core.GDBTypeParser;
import org.eclipse.cdt.debug.mi.core.MIException; 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.GDBTypeParser.GDBType;
import org.eclipse.cdt.debug.mi.core.cdi.model.Instruction; 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.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.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.ArrayType;
import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolType; import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolType;
import org.eclipse.cdt.debug.mi.core.cdi.model.type.CharType; 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 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) { if (name == null) {
name = new String(); name = new String();
} }
@ -260,21 +258,21 @@ public class SourceManager extends Manager implements ICDISourceManager {
switch(gdbType.getType()) { switch(gdbType.getType()) {
case GDBType.ARRAY: case GDBType.ARRAY:
int d = ((GDBDerivedType)gdbType).getDimension(); int d = ((GDBDerivedType)gdbType).getDimension();
aType = new ArrayType(target, gdbType.toString(), d); aType = new ArrayType(vo, gdbType.toString(), d);
break; break;
case GDBType.FUNCTION: case GDBType.FUNCTION:
aType = new FunctionType(target, gdbType.toString()); aType = new FunctionType(vo, gdbType.toString());
break; break;
case GDBType.POINTER: case GDBType.POINTER:
aType = new PointerType(target, gdbType.toString()); aType = new PointerType(vo, gdbType.toString());
break; break;
case GDBType.REFERENCE: case GDBType.REFERENCE:
aType = new ReferenceType(target, gdbType.toString()); aType = new ReferenceType(vo, gdbType.toString());
break; break;
} }
gdbType = ((GDBDerivedType)gdbType).getChild(); gdbType = ((GDBDerivedType)gdbType).getChild();
} else { } else {
aType = toCDIType(target, gdbType.toString()); aType = toCDIType(vo, gdbType.toString());
gdbType = null; gdbType = null;
} }
if (type instanceof DerivedType) { 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$ 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 // Check the derived types and agregate types
if (name == null) { if (name == null) {
name = new String(); name = new String();
@ -301,50 +299,50 @@ public class SourceManager extends Manager implements ICDISourceManager {
// Check the primitives. // Check the primitives.
if (typename.equals("char")) { //$NON-NLS-1$ 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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$ } 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 // GDB has some special types for int
if (typename.equals("int8_t")) { //$NON-NLS-1$ 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$ } 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$ } 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$ } 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$ } 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$ boolean isEnum = first.equals("enum"); //$NON-NLS-1$
if (isChar && (isSigned || isUnsigned)) { if (isChar && (isSigned || isUnsigned)) {
return new CharType(target, typename, isUnsigned); return new CharType(vo, typename, isUnsigned);
} else if (isShort && (isSigned || isUnsigned)) { } else if (isShort && (isSigned || isUnsigned)) {
return new ShortType(target, typename, isUnsigned); return new ShortType(vo, typename, isUnsigned);
} else if (isInt && (isSigned || isUnsigned)) { } else if (isInt && (isSigned || isUnsigned)) {
return new IntType(target, typename, isUnsigned); return new IntType(vo, typename, isUnsigned);
} else if (isLong && (isInt || isSigned || isUnsigned)) { } else if (isLong && (isInt || isSigned || isUnsigned)) {
return new LongType(target, typename, isUnsigned); return new LongType(vo, typename, isUnsigned);
} else if (isLongLong) { } else if (isLongLong) {
return new LongLongType(target, typename); return new LongLongType(vo, typename);
} else if (isDouble && (isLong || isComplex || isImaginery)) { } 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)) { } else if (isFloat && (isComplex || isImaginery)) {
return new FloatType(target, typename, isComplex, isImaginery); return new FloatType(vo, typename, isComplex, isImaginery);
} else if (isStruct) { } else if (isStruct) {
return new StructType(target, typename); return new StructType(vo, typename);
} else if (isClass) { } else if (isClass) {
return new StructType(target, typename); return new StructType(vo, typename);
} else if (isUnion) { } else if (isUnion) {
return new StructType(target, typename); return new StructType(vo, typename);
} else if (isEnum) { } else if (isEnum) {
return new EnumType(target, typename); return new EnumType(vo, typename);
} }
} else if (count == 3) { } else if (count == 3) {
// ISOC allows permutation. replace short by: long or short // 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)) { if (isShort && isInt && (isSigned || unSigned)) {
return new ShortType(target, typename, unSigned); return new ShortType(vo, typename, unSigned);
} else if (isLong && isInt && (isSigned || unSigned)) { } else if (isLong && isInt && (isSigned || unSigned)) {
return new LongType(target, typename, unSigned); return new LongType(vo, typename, unSigned);
} else if (isLongLong && (isSigned || unSigned)) { } else if (isLongLong && (isSigned || unSigned)) {
return new LongLongType(target, typename, unSigned); return new LongLongType(vo, typename, unSigned);
} else if (isDouble && isLong && (isComplex || isImaginery)) { } 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) { } else if (count == 4) {
// ISOC allows permutation: // 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$ || (third.equals("long") && fourth.equals("long")); //$NON-NLS-1$ //$NON-NLS-2$
if (isLongLong && isInt && (isSigned || unSigned)) { 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$ 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(); Target target = (Target)frame.getTarget();
ICDIThread currentThread = target.getCurrentThread(); ICDIThread currentThread = target.getCurrentThread();
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame(); ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();

View file

@ -164,28 +164,28 @@ public class VariableObject extends CObject implements ICDIVariableObject {
ICDIStackFrame frame = getStackFrame(); ICDIStackFrame frame = getStackFrame();
Session session = (Session) (target.getSession()); Session session = (Session) (target.getSession());
SourceManager sourceMgr = (SourceManager) session.getSourceManager(); SourceManager sourceMgr = (SourceManager) session.getSourceManager();
String nametype = sourceMgr.getTypeName(frame, getQualifiedName()); String nametype = sourceMgr.getTypeName(this, getQualifiedName());
try { try {
type = sourceMgr.getType(target, nametype); type = sourceMgr.getType(this, nametype);
} catch (CDIException e) { } catch (CDIException e) {
// Try with ptype. // Try with ptype.
try { try {
String ptype = sourceMgr.getDetailTypeName(frame, nametype); String ptype = sourceMgr.getDetailTypeName(frame, nametype);
type = sourceMgr.getType(target, ptype); type = sourceMgr.getType(this, ptype);
} catch (CDIException ex) { } catch (CDIException ex) {
// Some version of gdb does not work woth the name of the class // 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 data --> fails
// ex: class data foo --> ptype foo --> succeed // ex: class data foo --> ptype foo --> succeed
try { try {
String ptype = sourceMgr.getDetailTypeName(frame, getQualifiedName()); String ptype = sourceMgr.getDetailTypeName(frame, getQualifiedName());
type = sourceMgr.getType(target, ptype); type = sourceMgr.getType(this, ptype);
} catch (CDIException e2) { } catch (CDIException e2) {
// give up. // give up.
} }
} }
} }
if (type == null) { if (type == null) {
type = new IncompleteType(target, nametype); type = new IncompleteType(this, nametype);
} }
} }
return type; return type;

View file

@ -12,13 +12,13 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 abstract class AggregateType extends Type implements ICDIAggregateType {
public AggregateType(Target target, String typename) { public AggregateType(VariableObject vo, String typename) {
super(target, typename); super(vo, typename);
} }
} }

View file

@ -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.ICDIArrayType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; 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 * @param typename
*/ */
public ArrayType(Target target, String typename,int dim) { public ArrayType(VariableObject vo, String typename,int dim) {
super(target, typename); super(vo, typename);
dimension = dim; dimension = dim;
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public BoolType(Target target, String typename) { public BoolType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public BoolType(Target target, String typename, boolean usigned) { public BoolType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public CharType(Target target, String typename) { public CharType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public CharType(Target target, String typename, boolean usigned) { public CharType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }

View file

@ -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.Session;
import org.eclipse.cdt.debug.mi.core.cdi.SourceManager; 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.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; ICDIType derivedType;
public DerivedType(Target target, String typename) { public DerivedType(VariableObject vo, String typename) {
super(target, typename); super(vo, typename);
} }
public void setComponentType(ICDIType dtype) { public void setComponentType(ICDIType dtype) {
@ -37,19 +38,17 @@ public abstract class DerivedType extends Type implements ICDIDerivedType {
Session session = (Session)(target.getSession()); Session session = (Session)(target.getSession());
SourceManager sourceMgr = (SourceManager)session.getSourceManager(); SourceManager sourceMgr = (SourceManager)session.getSourceManager();
try { try {
derivedType = sourceMgr.getType(target, name); derivedType = sourceMgr.getType(getVariableObject(), name);
} catch (CDIException e) { } catch (CDIException e) {
// Try after ptype. // Try after ptype.
try { try {
//String ptype = sourceMgr.getDetailTypeName(target, name); String ptype = sourceMgr.getDetailTypeName(getVariableObject().getStackFrame(), name);
// TODO: this type should be created with frames not targets. derivedType = sourceMgr.getType(getVariableObject(), ptype);
String ptype = sourceMgr.getDetailTypeName(target.getCurrentThread().getCurrentStackFrame(), name);
derivedType = sourceMgr.getType(target, ptype);
} catch (CDIException ex) { } catch (CDIException ex) {
} }
} }
if (derivedType == null) { if (derivedType == null) {
derivedType = new IncompleteType(target, name); derivedType = new IncompleteType(getVariableObject(), name);
} }
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public DoubleType(Target target, String typename) { public DoubleType(VariableObject vo, String typename) {
this(target, typename, false, false, false); this(vo, typename, false, false, false);
} }
public DoubleType(Target target, String typename, boolean isComplex, boolean isImg, boolean isLong) { public DoubleType(VariableObject vo, String typename, boolean isComplex, boolean isImg, boolean isLong) {
super(target, typename, isComplex, isImg, isLong); super(vo, typename, isComplex, isImg, isLong);
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public EnumType(Target target, String typename) { public EnumType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public EnumType(Target target, String typename, boolean usigned) { public EnumType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public FloatType(Target target, String typename) { public FloatType(VariableObject vo, String typename) {
this(target, typename, false, false); this(vo, typename, false, false);
} }
public FloatType(Target target, String typename, boolean isComplex, boolean isImg) { public FloatType(VariableObject vo, String typename, boolean isComplex, boolean isImg) {
super(target, typename, isComplex, isImg, false); super(vo, typename, isComplex, isImg, false);
} }
} }

View file

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

View file

@ -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.ICDIFunctionType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; 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$ String params = ""; //$NON-NLS-1$
public FunctionType(Target target, String typename) { public FunctionType(VariableObject vo, String typename) {
super(target, typename); super(vo, typename);
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -11,7 +11,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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 * @param name
*/ */
public IncompleteType(Target target, String name) { public IncompleteType(VariableObject vo, String name) {
super(target, name); super(vo, name);
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public IntType(Target target, String typename) { public IntType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public IntType(Target target, String typename, boolean isUnsigned) { public IntType(VariableObject vo, String typename, boolean isUnsigned) {
super(target, typename, isUnsigned); super(vo, typename, isUnsigned);
} }
} }

View file

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

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public LongLongType(Target target, String typename) { public LongLongType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public LongLongType(Target target, String typename, boolean usigned) { public LongLongType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public LongType(Target target, String typename) { public LongType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public LongType(Target target, String typename, boolean usigned) { public LongType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }

View file

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

View file

@ -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.ICDIReferenceType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType; 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 * @param name
*/ */
public ReferenceType(Target target, String name) { public ReferenceType(VariableObject vo, String name) {
super(target, name); super(vo, name);
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public ShortType(Target target, String typename) { public ShortType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public ShortType(Target target, String typename, boolean usigned) { public ShortType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public StructType(Target target, String typename) { public StructType(VariableObject vo, String typename) {
super(target, typename); super(vo, typename);
} }

View file

@ -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.core.cdi.model.type.ICDIType;
import org.eclipse.cdt.debug.mi.core.cdi.model.CObject; 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.Target;
import org.eclipse.cdt.debug.mi.core.cdi.model.VariableObject;
/** /**
*/ */
public abstract class Type extends CObject implements ICDIType { public abstract class Type extends CObject implements ICDIType {
VariableObject fVariableObject;
String typename; String typename;
String detailName; String detailName;
public Type(Target target, String name) { public Type(VariableObject vo, String name) {
super(target); super((Target)vo.getTarget());
typename = name; typename = name;
fVariableObject = vo;
}
public VariableObject getVariableObject() {
return fVariableObject;
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -12,13 +12,13 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 class VoidType extends Type implements ICDIVoidType {
public VoidType(Target target, String typename) { public VoidType(VariableObject vo, String typename) {
super(target, typename); super(vo, typename);
} }
} }

View file

@ -13,7 +13,7 @@
package org.eclipse.cdt.debug.mi.core.cdi.model.type; 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.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 * @param typename
*/ */
public WCharType(Target target, String typename) { public WCharType(VariableObject vo, String typename) {
this(target, typename, false); this(vo, typename, false);
} }
public WCharType(Target target, String typename, boolean usigned) { public WCharType(VariableObject vo, String typename, boolean usigned) {
super(target, typename, usigned); super(vo, typename, usigned);
} }
} }