mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 05:15:43 +02:00
New method getVariableArrayObject
This commit is contained in:
parent
53d377dbc9
commit
1b8719123e
1 changed files with 24 additions and 0 deletions
|
@ -293,6 +293,30 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
|
||||||
return new VariableObject(target, buffer.toString(), null, 0, 0);
|
return new VariableObject(target, buffer.toString(), null, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getVariableArrayObject(ICDIVariableObject, String, int, int)
|
||||||
|
*/
|
||||||
|
public ICDIVariableObject getVariableArrayObject(ICDIVariableObject object, String type, int start, int end) throws CDIException {
|
||||||
|
if (object instanceof VariableObject) {
|
||||||
|
VariableObject obj = (VariableObject)object;
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
buffer.append("*(");
|
||||||
|
buffer.append('(');
|
||||||
|
if (type != null && type.length() > 0) {
|
||||||
|
buffer.append('(').append(type).append(')');
|
||||||
|
}
|
||||||
|
buffer.append(obj.getName());
|
||||||
|
buffer.append(')');
|
||||||
|
if (start != 0) {
|
||||||
|
buffer.append('+').append(start);
|
||||||
|
}
|
||||||
|
buffer.append(')');
|
||||||
|
buffer.append('@').append(end - start + 1);
|
||||||
|
return new VariableObject(obj, buffer.toString());
|
||||||
|
}
|
||||||
|
throw new CDIException("Unknown variable object");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getVariableObjects(ICDIStackFrame)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getVariableObjects(ICDIStackFrame)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue