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

Throw CDIException if getRegisters() failed.

This commit is contained in:
Alain Magloire 2002-09-16 22:22:37 +00:00
parent 2ffa2611d2
commit e25f73cf71
2 changed files with 5 additions and 10 deletions

View file

@ -51,7 +51,7 @@ public interface ICDIStackFrame extends ICDIObject
* @return a collection of registers
* @throws CDIException if this method fails:
*/
ICDIRegister[] getRegisters(ICDIRegisterObject[] regs);
ICDIRegister[] getRegisters(ICDIRegisterObject[] regs) throws CDIException;
/**
* Returns the level of the stack frame.

View file

@ -135,20 +135,15 @@ public class StackFrame extends CObject implements ICDIStackFrame {
/**
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getRegisters(ICDIRegisterObject[])
*/
public ICDIRegister[] getRegisters(ICDIRegisterObject[] regs) {
public ICDIRegister[] getRegisters(ICDIRegisterObject[] regs) throws CDIException {
ICDIRegister[] registers = null;
CSession session = getCTarget().getCSession();
VariableManager mgr = (VariableManager)session.getVariableManager();
MISession mi = session.getMISession();
CommandFactory factory = mi.getCommandFactory();
try {
registers = new ICDIRegister[regs.length];
for (int i = 0; i < registers.length; i++) {
registers[i] = mgr.createRegister(this, regs[i].getName());
}
} catch (CDIException e) {
//throw e;
//System.err.println(e);
registers = new ICDIRegister[regs.length];
for (int i = 0; i < registers.length; i++) {
registers[i] = mgr.createRegister(this, regs[i].getName());
}
if (registers == null) {
registers = new ICDIRegister[0];