Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-09-16 19:25:27 +0000
committerMikhail Khodjaiants2005-09-16 19:25:27 +0000
commitc02183019926873ad6fd89a1eaa4eb3851f703eb (patch)
tree2290066a5450cdd3c5a46a68c257c0b9fa788e17
parent4250821a80533963485ab3f88d4e6764d42fc0c6 (diff)
downloadorg.eclipse.cdt-c02183019926873ad6fd89a1eaa4eb3851f703eb.tar.gz
org.eclipse.cdt-c02183019926873ad6fd89a1eaa4eb3851f703eb.tar.xz
org.eclipse.cdt-c02183019926873ad6fd89a1eaa4eb3851f703eb.zip
Bug 109785: "mi_cmd_var_create: unable to create variable object" when stepping out of stack frame.
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java12
2 files changed, 13 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index 6cca0082ec0..97ccdc076d5 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,3 +1,7 @@
+2005-09-16 Mikhail Khodjaiants
+ Bug 109785: "mi_cmd_var_create: unable to create variable object" when stepping out of stack frame.
+ * CStackFrame.java
+
2005-09-09 Mikhail Khodjaiants
Bug 109206: Last register group is not added if it has only one register.
* CRegisterManager.java
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
index 593df825ed1..ee25f428bcf 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
@@ -111,6 +111,9 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
* @see org.eclipse.debug.core.model.IStackFrame#getVariables()
*/
public IVariable[] getVariables() throws DebugException {
+ if ( isDisposed() ) {
+ return new IVariable[0];
+ }
ICGlobalVariable[] globals = getGlobals();
List vars = getVariables0();
List all = new ArrayList( globals.length + vars.size() );
@@ -120,6 +123,9 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
}
protected synchronized List getVariables0() throws DebugException {
+ if ( isDisposed() ) {
+ return Collections.EMPTY_LIST;
+ }
CThread thread = (CThread)getThread();
if ( thread.isSuspended() ) {
if ( fVariables == null ) {
@@ -175,7 +181,7 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
* @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
*/
public boolean hasVariables() throws DebugException {
- return getVariables0().size() > 0;
+ return ( isDisposed() ) ? false : getVariables0().size() > 0;
}
/* (non-Javadoc)
@@ -232,14 +238,14 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
* @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
*/
public IRegisterGroup[] getRegisterGroups() throws DebugException {
- return ((CDebugTarget)getDebugTarget()).getRegisterGroups( this );
+ return ( isDisposed() ) ? new IRegisterGroup[0] : ((CDebugTarget)getDebugTarget()).getRegisterGroups( this );
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
*/
public boolean hasRegisterGroups() throws DebugException {
- return ((CDebugTarget)getDebugTarget()).getRegisterGroups( this ).length > 0;
+ return ( isDisposed() ) ? false : ((CDebugTarget)getDebugTarget()).getRegisterGroups( this ).length > 0;
}
/* (non-Javadoc)

Back to the top