mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
some element of the argument array was null.
This commit is contained in:
parent
0ba89e631c
commit
1a65c8e127
1 changed files with 10 additions and 11 deletions
|
@ -5,6 +5,9 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIArgument;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIArgument;
|
||||||
|
@ -45,7 +48,7 @@ public class StackFrame extends CObject implements ICDIStackFrame {
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getArguments()
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getArguments()
|
||||||
*/
|
*/
|
||||||
public ICDIArgument[] getArguments() throws CDIException {
|
public ICDIArgument[] getArguments() throws CDIException {
|
||||||
ICDIArgument[] cdiArgs = null;
|
List cdiList = new ArrayList();
|
||||||
if (frame != null) {
|
if (frame != null) {
|
||||||
CSession session = getCTarget().getCSession();
|
CSession session = getCTarget().getCSession();
|
||||||
VariableManager mgr = (VariableManager)session.getVariableManager();
|
VariableManager mgr = (VariableManager)session.getVariableManager();
|
||||||
|
@ -68,13 +71,12 @@ public class StackFrame extends CObject implements ICDIStackFrame {
|
||||||
args = miFrames[0].getArgs();
|
args = miFrames[0].getArgs();
|
||||||
}
|
}
|
||||||
if (args != null) {
|
if (args != null) {
|
||||||
cdiArgs = new ICDIArgument[args.length];
|
for (int i = 0; i < args.length; i++) {
|
||||||
for (int i = 0; i < cdiArgs.length; i++) {
|
try {
|
||||||
cdiArgs[i] =
|
cdiList.add(mgr.createArgument(this, args[i].getName()));
|
||||||
mgr.createArgument(this, args[i].getName());
|
} catch (CDIException e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
cdiArgs = new ICDIArgument[0];
|
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
//throw new CDIException(e.getMessage());
|
//throw new CDIException(e.getMessage());
|
||||||
|
@ -84,10 +86,7 @@ public class StackFrame extends CObject implements ICDIStackFrame {
|
||||||
//System.err.println(e);
|
//System.err.println(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cdiArgs == null) {
|
return (ICDIArgument[])cdiList.toArray(new ICDIArgument[0]);
|
||||||
cdiArgs = new ICDIArgument[0];
|
|
||||||
}
|
|
||||||
return cdiArgs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue