mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
2004-11-19 Alain Magloire
No need for stackframe when creating the Type class, but rather use the target in the constructor.
This commit is contained in:
parent
eecdc3e370
commit
052b582c19
28 changed files with 180 additions and 176 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-11-19 Alain Magloire
|
||||
No need for stackframe when creating the Type class,
|
||||
but rather use the target in the constructor.
|
||||
|
||||
2004-11-19 Alain Magloire
|
||||
Fix for 78816
|
||||
* src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
|
||||
|
|
|
@ -42,14 +42,12 @@ public class FunctionFinished extends EndSteppingRange implements ICDIFunctionFi
|
|||
public ICDIType getReturnType() throws CDIException {
|
||||
Session session = (Session)getSession();
|
||||
Target target = session.getTarget(fMIEvent.getMISession());
|
||||
Thread thread = (Thread)target.getCurrentThread();
|
||||
StackFrame frame = thread.getCurrentStackFrame();
|
||||
String rType = fMIEvent.getReturnType();
|
||||
if (rType == null || rType.length() == 0) {
|
||||
throw new CDIException(CdiResources.getString("cdi.VariableManager.Unknown_type")); //$NON-NLS-1$
|
||||
}
|
||||
SourceManager srcMgr = session.getSourceManager();
|
||||
return srcMgr.getType(frame, rType);
|
||||
return srcMgr.getType(target, rType);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -183,7 +183,7 @@ public class SourceManager extends Manager {
|
|||
public void update(Target target) throws CDIException {
|
||||
}
|
||||
|
||||
public Type getType(StackFrame frame, String name) throws CDIException {
|
||||
public Type getType(Target target, String name) throws CDIException {
|
||||
if (name == null) {
|
||||
name = new String();
|
||||
}
|
||||
|
@ -201,21 +201,21 @@ public class SourceManager extends Manager {
|
|||
switch(gdbType.getType()) {
|
||||
case GDBType.ARRAY:
|
||||
int d = ((GDBDerivedType)gdbType).getDimension();
|
||||
aType = new ArrayType(frame, gdbType.toString(), d);
|
||||
aType = new ArrayType(target, gdbType.toString(), d);
|
||||
break;
|
||||
case GDBType.FUNCTION:
|
||||
aType = new FunctionType(frame, gdbType.toString());
|
||||
aType = new FunctionType(target, gdbType.toString());
|
||||
break;
|
||||
case GDBType.POINTER:
|
||||
aType = new PointerType(frame, gdbType.toString());
|
||||
aType = new PointerType(target, gdbType.toString());
|
||||
break;
|
||||
case GDBType.REFERENCE:
|
||||
aType = new ReferenceType(frame, gdbType.toString());
|
||||
aType = new ReferenceType(target, gdbType.toString());
|
||||
break;
|
||||
}
|
||||
gdbType = ((GDBDerivedType)gdbType).getChild();
|
||||
} else {
|
||||
aType = toCDIType(frame, gdbType.toString());
|
||||
aType = toCDIType(target, gdbType.toString());
|
||||
gdbType = null;
|
||||
}
|
||||
if (type instanceof DerivedType) {
|
||||
|
@ -233,7 +233,7 @@ public class SourceManager extends Manager {
|
|||
throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
Type toCDIType(StackFrame frame, String name) throws CDIException {
|
||||
Type toCDIType(Target target, String name) throws CDIException {
|
||||
// Check the derived types and agregate types
|
||||
if (name == null) {
|
||||
name = new String();
|
||||
|
@ -242,50 +242,50 @@ public class SourceManager extends Manager {
|
|||
|
||||
// Check the primitives.
|
||||
if (typename.equals("char")) { //$NON-NLS-1$
|
||||
return new CharType(frame, typename);
|
||||
return new CharType(target, typename);
|
||||
} else if (typename.equals("wchar_t")) { //$NON-NLS-1$
|
||||
return new WCharType(frame, typename);
|
||||
return new WCharType(target, typename);
|
||||
} else if (typename.equals("short")) { //$NON-NLS-1$
|
||||
return new ShortType(frame, typename);
|
||||
return new ShortType(target, typename);
|
||||
} else if (typename.equals("int")) { //$NON-NLS-1$
|
||||
return new IntType(frame, typename);
|
||||
return new IntType(target, typename);
|
||||
} else if (typename.equals("long")) { //$NON-NLS-1$
|
||||
return new LongType(frame, typename);
|
||||
return new LongType(target, typename);
|
||||
} else if (typename.equals("unsigned")) { //$NON-NLS-1$
|
||||
return new IntType(frame, typename, true);
|
||||
return new IntType(target, typename, true);
|
||||
} else if (typename.equals("signed")) { //$NON-NLS-1$
|
||||
return new IntType(frame, typename);
|
||||
return new IntType(target, typename);
|
||||
} else if (typename.equals("bool")) { //$NON-NLS-1$
|
||||
return new BoolType(frame, typename);
|
||||
return new BoolType(target, typename);
|
||||
} else if (typename.equals("_Bool")) { //$NON-NLS-1$
|
||||
return new BoolType(frame, typename);
|
||||
return new BoolType(target, typename);
|
||||
} else if (typename.equals("float")) { //$NON-NLS-1$
|
||||
return new FloatType(frame, typename);
|
||||
return new FloatType(target, typename);
|
||||
} else if (typename.equals("double")) { //$NON-NLS-1$
|
||||
return new DoubleType(frame, typename);
|
||||
return new DoubleType(target, typename);
|
||||
} else if (typename.equals("void")) { //$NON-NLS-1$
|
||||
return new VoidType(frame, typename);
|
||||
return new VoidType(target, typename);
|
||||
} else if (typename.equals("enum")) { //$NON-NLS-1$
|
||||
return new EnumType(frame, typename);
|
||||
return new EnumType(target, typename);
|
||||
} else if (typename.equals("union")) { //$NON-NLS-1$
|
||||
return new StructType(frame, typename);
|
||||
return new StructType(target, typename);
|
||||
} else if (typename.equals("struct")) { //$NON-NLS-1$
|
||||
return new StructType(frame, typename);
|
||||
return new StructType(target, typename);
|
||||
} else if (typename.equals("class")) { //$NON-NLS-1$
|
||||
return new StructType(frame, typename);
|
||||
return new StructType(target, typename);
|
||||
}
|
||||
|
||||
// GDB has some special types for int
|
||||
if (typename.equals("int8_t")) { //$NON-NLS-1$
|
||||
return new CharType(frame, typename);
|
||||
return new CharType(target, typename);
|
||||
} else if (typename.equals("int16_t")) { //$NON-NLS-1$
|
||||
return new ShortType(frame, typename);
|
||||
return new ShortType(target, typename);
|
||||
} else if (typename.equals("int32_t")) { //$NON-NLS-1$
|
||||
return new LongType(frame, typename);
|
||||
return new LongType(target, typename);
|
||||
} else if (typename.equals("int64_t")) { //$NON-NLS-1$
|
||||
return new LongLongType(frame, typename);
|
||||
return new LongLongType(target, typename);
|
||||
} else if (typename.equals("int128_t")) { //$NON-NLS-1$
|
||||
return new IntType(frame, typename); // ????
|
||||
return new IntType(target, typename); // ????
|
||||
}
|
||||
|
||||
|
||||
|
@ -318,27 +318,27 @@ public class SourceManager extends Manager {
|
|||
boolean isEnum = first.equals("enum"); //$NON-NLS-1$
|
||||
|
||||
if (isChar && (isSigned || isUnsigned)) {
|
||||
return new CharType(frame, typename, isUnsigned);
|
||||
return new CharType(target, typename, isUnsigned);
|
||||
} else if (isShort && (isSigned || isUnsigned)) {
|
||||
return new ShortType(frame, typename, isUnsigned);
|
||||
return new ShortType(target, typename, isUnsigned);
|
||||
} else if (isInt && (isSigned || isUnsigned)) {
|
||||
return new IntType(frame, typename, isUnsigned);
|
||||
return new IntType(target, typename, isUnsigned);
|
||||
} else if (isLong && (isInt || isSigned || isUnsigned)) {
|
||||
return new LongType(frame, typename, isUnsigned);
|
||||
return new LongType(target, typename, isUnsigned);
|
||||
} else if (isLongLong) {
|
||||
return new LongLongType(frame, typename);
|
||||
return new LongLongType(target, typename);
|
||||
} else if (isDouble && (isLong || isComplex || isImaginery)) {
|
||||
return new DoubleType(frame, typename, isComplex, isImaginery, isLong);
|
||||
return new DoubleType(target, typename, isComplex, isImaginery, isLong);
|
||||
} else if (isFloat && (isComplex || isImaginery)) {
|
||||
return new FloatType(frame, typename, isComplex, isImaginery);
|
||||
return new FloatType(target, typename, isComplex, isImaginery);
|
||||
} else if (isStruct) {
|
||||
return new StructType(frame, typename);
|
||||
return new StructType(target, typename);
|
||||
} else if (isClass) {
|
||||
return new StructType(frame, typename);
|
||||
return new StructType(target, typename);
|
||||
} else if (isUnion) {
|
||||
return new StructType(frame, typename);
|
||||
return new StructType(target, typename);
|
||||
} else if (isEnum) {
|
||||
return new EnumType(frame, typename);
|
||||
return new EnumType(target, typename);
|
||||
}
|
||||
} else if (count == 3) {
|
||||
// ISOC allows permutation. replace short by: long or short
|
||||
|
@ -366,13 +366,13 @@ public class SourceManager extends Manager {
|
|||
|
||||
|
||||
if (isShort && isInt && (isSigned || unSigned)) {
|
||||
return new ShortType(frame, typename, unSigned);
|
||||
return new ShortType(target, typename, unSigned);
|
||||
} else if (isLong && isInt && (isSigned || unSigned)) {
|
||||
return new LongType(frame, typename, unSigned);
|
||||
return new LongType(target, typename, unSigned);
|
||||
} else if (isLongLong && (isSigned || unSigned)) {
|
||||
return new LongLongType(frame, typename, unSigned);
|
||||
return new LongLongType(target, typename, unSigned);
|
||||
} else if (isDouble && isLong && (isComplex || isImaginery)) {
|
||||
return new DoubleType(frame, typename, isComplex, isImaginery, isLong);
|
||||
return new DoubleType(target, typename, isComplex, isImaginery, isLong);
|
||||
}
|
||||
} else if (count == 4) {
|
||||
// ISOC allows permutation:
|
||||
|
@ -392,18 +392,26 @@ 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(frame, typename, unSigned);
|
||||
return new LongLongType(target, typename, unSigned);
|
||||
}
|
||||
}
|
||||
throw new CDIException(CdiResources.getString("cdi.SourceManager.Unknown_type")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public String getDetailTypeName(StackFrame frame, String typename) throws CDIException {
|
||||
public String getDetailTypeNameFromVariable(StackFrame frame, String variable) throws CDIException {
|
||||
Target target = (Target)frame.getTarget();
|
||||
Thread currentThread = (Thread)target.getCurrentThread();
|
||||
StackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||
target.setCurrentThread(frame.getThread(), false);
|
||||
((Thread)frame.getThread()).setCurrentStackFrame(frame, false);
|
||||
try {
|
||||
return getDetailTypeName(target, variable);
|
||||
} finally {
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
}
|
||||
public String getDetailTypeName(Target target, String typename) throws CDIException {
|
||||
try {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
@ -416,13 +424,10 @@ public class SourceManager extends Manager {
|
|||
return info.getType();
|
||||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
}
|
||||
|
||||
public String getTypeName(StackFrame frame, String variable) throws CDIException {
|
||||
public String getTypeNameFromVariable(StackFrame frame, String variable) throws CDIException {
|
||||
Target target = (Target)frame.getTarget();
|
||||
Thread currentThread = null;
|
||||
StackFrame currentFrame = null;
|
||||
|
|
|
@ -548,7 +548,13 @@ public class VariableManager extends Manager {
|
|||
// Fire a destroyEvent ?
|
||||
Target target = (Target)variable.getTarget();
|
||||
MISession mi = target.getMISession();
|
||||
removeMIVar(mi, variable.getMIVar());
|
||||
// no need to call -var-delete for variable that are not in
|
||||
// the list most probaby they are children of other variables and in this case
|
||||
// we should not delete them
|
||||
List varList = getVariablesList(target);
|
||||
if (varList.contains(variable)) {
|
||||
removeMIVar(mi, variable.getMIVar());
|
||||
}
|
||||
MIVarDeletedEvent del = new MIVarDeletedEvent(mi, variable.getMIVar().getVarName());
|
||||
mi.fireEvent(del);
|
||||
}
|
||||
|
|
|
@ -63,28 +63,28 @@ public class Expression extends CObject implements ICDIExpression {
|
|||
Target target = (Target)getTarget();
|
||||
Session session = (Session) (target.getSession());
|
||||
SourceManager sourceMgr = session.getSourceManager();
|
||||
String nametype = sourceMgr.getTypeName((StackFrame)frame, getExpressionText());
|
||||
String nametype = sourceMgr.getTypeNameFromVariable((StackFrame)frame, getExpressionText());
|
||||
try {
|
||||
type = sourceMgr.getType((StackFrame)frame, nametype);
|
||||
type = sourceMgr.getType(target, nametype);
|
||||
} catch (CDIException e) {
|
||||
// Try with ptype.
|
||||
try {
|
||||
String ptype = sourceMgr.getDetailTypeName((StackFrame)frame, nametype);
|
||||
type = sourceMgr.getType((StackFrame)frame, ptype);
|
||||
String ptype = sourceMgr.getDetailTypeName(target, nametype);
|
||||
type = sourceMgr.getType(target, 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((StackFrame)frame, getExpressionText());
|
||||
type = sourceMgr.getType((StackFrame)frame, ptype);
|
||||
String ptype = sourceMgr.getDetailTypeNameFromVariable((StackFrame)frame, getExpressionText());
|
||||
type = sourceMgr.getType(target, ptype);
|
||||
} catch (CDIException e2) {
|
||||
// give up.
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type == null) {
|
||||
type = new IncompleteType((StackFrame)frame, nametype);
|
||||
type = new IncompleteType(target, nametype);
|
||||
}
|
||||
|
||||
return type;
|
||||
|
|
|
@ -170,38 +170,38 @@ public abstract class VariableDescriptor extends CObject implements ICDIVariable
|
|||
if (fType == null) {
|
||||
String nametype = getTypeName();
|
||||
Target target = (Target)getTarget();
|
||||
StackFrame frame = (StackFrame)getStackFrame();
|
||||
if (frame == null) {
|
||||
Thread thread = (Thread)getThread();
|
||||
if (thread != null) {
|
||||
frame = thread.getCurrentStackFrame();
|
||||
} else {
|
||||
frame = ((Thread)target.getCurrentThread()).getCurrentStackFrame();
|
||||
}
|
||||
}
|
||||
Session session = (Session) target.getSession();
|
||||
SourceManager sourceMgr = session.getSourceManager();
|
||||
try {
|
||||
fType = sourceMgr.getType(frame, nametype);
|
||||
fType = sourceMgr.getType(target, nametype);
|
||||
} catch (CDIException e) {
|
||||
// Try with ptype.
|
||||
try {
|
||||
String ptype = sourceMgr.getDetailTypeName(frame, nametype);
|
||||
fType = sourceMgr.getType(frame, ptype);
|
||||
String ptype = sourceMgr.getDetailTypeName(target, nametype);
|
||||
fType = sourceMgr.getType(target, ptype);
|
||||
} catch (CDIException ex) {
|
||||
// Some version of gdb does not work woth the name of the class
|
||||
// Some version of gdb does not work on the name of the class
|
||||
// ex: class data foo --> ptype data --> fails
|
||||
// ex: class data foo --> ptype foo --> succeed
|
||||
StackFrame frame = (StackFrame)getStackFrame();
|
||||
if (frame == null) {
|
||||
Thread thread = (Thread)getThread();
|
||||
if (thread != null) {
|
||||
frame = thread.getCurrentStackFrame();
|
||||
} else {
|
||||
frame = ((Thread)target.getCurrentThread()).getCurrentStackFrame();
|
||||
}
|
||||
}
|
||||
try {
|
||||
String ptype = sourceMgr.getDetailTypeName(frame, getQualifiedName());
|
||||
fType = sourceMgr.getType(frame, ptype);
|
||||
String ptype = sourceMgr.getDetailTypeNameFromVariable(frame, getQualifiedName());
|
||||
fType = sourceMgr.getType(target, ptype);
|
||||
} catch (CDIException e2) {
|
||||
// give up.
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fType == null) {
|
||||
fType = new IncompleteType(frame, nametype);
|
||||
fType = new IncompleteType(target, nametype);
|
||||
}
|
||||
}
|
||||
return fType;
|
||||
|
@ -284,7 +284,7 @@ public abstract class VariableDescriptor extends CObject implements ICDIVariable
|
|||
}
|
||||
Session session = (Session) target.getSession();
|
||||
SourceManager sourceMgr = session.getSourceManager();
|
||||
fTypename = sourceMgr.getTypeName(frame, getQualifiedName());
|
||||
fTypename = sourceMgr.getTypeNameFromVariable(frame, getQualifiedName());
|
||||
}
|
||||
return fTypename;
|
||||
}
|
||||
|
|
|
@ -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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
public abstract class AggregateType extends Type implements ICDIAggregateType {
|
||||
|
||||
public AggregateType(StackFrame frame, String typename) {
|
||||
super(frame, typename);
|
||||
public AggregateType(Target target, String typename) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -24,8 +24,8 @@ public class ArrayType extends DerivedType implements ICDIArrayType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public ArrayType(StackFrame frame, String typename,int dim) {
|
||||
super(frame, typename);
|
||||
public ArrayType(Target target, String typename,int dim) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,12 +21,12 @@ public class BoolType extends IntegralType implements ICDIBoolType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public BoolType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public BoolType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public BoolType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public BoolType(Target target, String typename, boolean usigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class CharType extends IntegralType implements ICDICharType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public CharType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public CharType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public CharType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public CharType(Target target, String typename, boolean usigned) {
|
||||
super(target, typename, usigned);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
|
@ -25,8 +24,8 @@ public abstract class DerivedType extends Type implements ICDIDerivedType {
|
|||
|
||||
ICDIType derivedType;
|
||||
|
||||
public DerivedType(StackFrame frame, String typename) {
|
||||
super(frame, typename);
|
||||
public DerivedType(Target target, String typename) {
|
||||
super(target, typename);
|
||||
}
|
||||
|
||||
public void setComponentType(ICDIType dtype) {
|
||||
|
@ -38,17 +37,17 @@ public abstract class DerivedType extends Type implements ICDIDerivedType {
|
|||
Session session = (Session)target.getSession();
|
||||
SourceManager sourceMgr = session.getSourceManager();
|
||||
try {
|
||||
derivedType = sourceMgr.getType((StackFrame)getStackFrame(), name);
|
||||
derivedType = sourceMgr.getType((Target)getTarget(), name);
|
||||
} catch (CDIException e) {
|
||||
// Try after ptype.
|
||||
try {
|
||||
String ptype = sourceMgr.getDetailTypeName((StackFrame)getStackFrame(), name);
|
||||
derivedType = sourceMgr.getType((StackFrame)getStackFrame(), ptype);
|
||||
String ptype = sourceMgr.getDetailTypeName((Target)getTarget(), name);
|
||||
derivedType = sourceMgr.getType((Target)getTarget(), ptype);
|
||||
} catch (CDIException ex) {
|
||||
}
|
||||
}
|
||||
if (derivedType == null) {
|
||||
derivedType = new IncompleteType((StackFrame)getStackFrame(), name);
|
||||
derivedType = new IncompleteType((Target)getTarget(), 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class DoubleType extends FloatingPointType implements ICDIDoubleType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public DoubleType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false, false, false);
|
||||
public DoubleType(Target target, String typename) {
|
||||
this(target, typename, false, false, false);
|
||||
}
|
||||
|
||||
public DoubleType(StackFrame frame, String typename, boolean isComplex, boolean isImg, boolean isLong) {
|
||||
super(frame, typename, isComplex, isImg, isLong);
|
||||
public DoubleType(Target target, String typename, boolean isComplex, boolean isImg, boolean isLong) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class EnumType extends IntegralType implements ICDIEnumType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public EnumType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public EnumType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public EnumType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public EnumType(Target target, String typename, boolean usigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class FloatType extends FloatingPointType implements ICDIFloatType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public FloatType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false, false);
|
||||
public FloatType(Target target, String typename) {
|
||||
this(target, typename, false, false);
|
||||
}
|
||||
|
||||
public FloatType(StackFrame frame, String typename, boolean isComplex, boolean isImg) {
|
||||
super(frame, typename, isComplex, isImg, false);
|
||||
public FloatType(Target target, String typename, boolean isComplex, boolean isImg) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -22,8 +22,8 @@ public abstract class FloatingPointType extends Type implements ICDIFloatingPoin
|
|||
boolean imaginary;
|
||||
boolean islong;
|
||||
|
||||
public FloatingPointType(StackFrame frame, String typename, boolean comp, boolean img, boolean l) {
|
||||
super(frame, typename);
|
||||
public FloatingPointType(Target target, String typename, boolean comp, boolean img, boolean l) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,8 +21,8 @@ public class FunctionType extends DerivedType implements ICDIFunctionType {
|
|||
|
||||
String params = ""; //$NON-NLS-1$
|
||||
|
||||
public FunctionType(StackFrame frame, String typename) {
|
||||
super(frame, typename);
|
||||
public FunctionType(Target target, String typename) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -20,8 +20,8 @@ public class IncompleteType extends Type {
|
|||
/**
|
||||
* @param name
|
||||
*/
|
||||
public IncompleteType(StackFrame frame, String name) {
|
||||
super(frame, name);
|
||||
public IncompleteType(Target target, String name) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,12 +21,12 @@ public class IntType extends IntegralType implements ICDIIntType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public IntType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public IntType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public IntType(StackFrame frame, String typename, boolean isUnsigned) {
|
||||
super(frame, typename, isUnsigned);
|
||||
public IntType(Target target, String typename, boolean isUnsigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -20,8 +20,8 @@ public abstract class IntegralType extends Type implements ICDIIntegralType {
|
|||
|
||||
boolean unSigned;
|
||||
|
||||
public IntegralType(StackFrame frame, String typename, boolean isUnsigned) {
|
||||
super(frame, typename);
|
||||
public IntegralType(Target target, String typename, boolean isUnsigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class LongLongType extends IntegralType implements ICDILongLongType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public LongLongType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public LongLongType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public LongLongType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public LongLongType(Target target, String typename, boolean usigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class LongType extends IntegralType implements ICDILongType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public LongType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public LongType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public LongType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public LongType(Target target, String typename, boolean usigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class PointerType extends DerivedType implements ICDIPointerType {
|
||||
|
||||
public PointerType(StackFrame frame, String typename) {
|
||||
super(frame, typename);
|
||||
public PointerType(Target target, String typename) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -22,8 +22,8 @@ public class ReferenceType extends DerivedType implements ICDIReferenceType {
|
|||
/**
|
||||
* @param name
|
||||
*/
|
||||
public ReferenceType(StackFrame frame, String name) {
|
||||
super(frame, name);
|
||||
public ReferenceType(Target target, String name) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,11 +21,11 @@ public class ShortType extends IntegralType implements ICDIShortType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public ShortType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public ShortType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public ShortType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public ShortType(Target target, String typename, boolean usigned) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -21,8 +21,8 @@ public class StructType extends AggregateType implements ICDIStructType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public StructType(StackFrame frame, String typename) {
|
||||
super(frame, typename);
|
||||
public StructType(Target target, String typename) {
|
||||
super(target, typename);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,28 +11,20 @@
|
|||
|
||||
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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
public abstract class Type extends CObject implements ICDIType {
|
||||
|
||||
StackFrame fStackFrame;
|
||||
String typename;
|
||||
String detailName;
|
||||
|
||||
public Type(StackFrame frame, String name) {
|
||||
super((Target)frame.getTarget());
|
||||
public Type(Target target, String name) {
|
||||
super(target);
|
||||
typename = name;
|
||||
fStackFrame = frame;
|
||||
}
|
||||
|
||||
public ICDIStackFrame getStackFrame() {
|
||||
return fStackFrame;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class VoidType extends Type implements ICDIVoidType {
|
||||
|
||||
public VoidType(StackFrame frame) {
|
||||
this(frame, "void"); //$NON-NLS-1$
|
||||
public VoidType(Target target) {
|
||||
this(target, "void"); //$NON-NLS-1$
|
||||
}
|
||||
public VoidType(StackFrame frame, String typename) {
|
||||
super(frame, typename);
|
||||
public VoidType(Target target, String typename) {
|
||||
super(target, 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.StackFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -22,11 +22,11 @@ public class WCharType extends IntegralType implements ICDIWCharType {
|
|||
/**
|
||||
* @param typename
|
||||
*/
|
||||
public WCharType(StackFrame frame, String typename) {
|
||||
this(frame, typename, false);
|
||||
public WCharType(Target target, String typename) {
|
||||
this(target, typename, false);
|
||||
}
|
||||
|
||||
public WCharType(StackFrame frame, String typename, boolean usigned) {
|
||||
super(frame, typename, usigned);
|
||||
public WCharType(Target target, String typename, boolean usigned) {
|
||||
super(target, typename, usigned);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue