Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-07-29 02:12:02 +0000
committerMikhail Khodjaiants2005-07-29 02:12:02 +0000
commita5fdd63e34dd4d49f63c6975be12c8c478f631b8 (patch)
tree24ebdd6222b9f5fb86bcefdc5b29d540131f0248 /debug/org.eclipse.cdt.debug.core/cdi
parentfb81386aa2c85d44fd2593ef71595d4cbe78d68b (diff)
downloadorg.eclipse.cdt-a5fdd63e34dd4d49f63c6975be12c8c478f631b8.tar.gz
org.eclipse.cdt-a5fdd63e34dd4d49f63c6975be12c8c478f631b8.tar.xz
org.eclipse.cdt-a5fdd63e34dd4d49f63c6975be12c8c478f631b8.zip
Bug 104421: Register view can not show correct value when switch between different thread or stack frame.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core/cdi')
-rw-r--r--debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java49
-rw-r--r--debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java24
-rw-r--r--debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java27
-rw-r--r--debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java11
-rw-r--r--debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java8
-rw-r--r--debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java11
6 files changed, 107 insertions, 23 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java
index da962582519..d0ae70eae4f 100644
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java
+++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIRegister.java
@@ -11,6 +11,8 @@
package org.eclipse.cdt.debug.core.cdi.model;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+
/**
*
* A register is a special kind of variable that is contained
@@ -18,5 +20,50 @@ package org.eclipse.cdt.debug.core.cdi.model;
*
* @since Jul 9, 2002
*/
-public interface ICDIRegister extends ICDIVariable, ICDIRegisterDescriptor {
+public interface ICDIRegister extends ICDIRegisterDescriptor {
+ /**
+ * Returns true if the value of this variable could be changed.
+ *
+ * @return true if the value of this variable could be changed
+ * @throws CDIException if this method fails. Reasons include:
+ */
+ boolean isEditable() throws CDIException;
+
+ /**
+ * Returns the value of this variable.
+ *
+ * @param context
+ * @return the value of this variable
+ * @throws CDIException if this method fails. Reasons include:
+ */
+ ICDIValue getValue(ICDIStackFrame context) throws CDIException;
+
+ /**
+ * Attempts to set the value of this variable to the value of
+ * the given expression.
+ *
+ * @param expression - an expression to generate a new value
+ * @throws CDIException if this method fails. Reasons include:
+ */
+ void setValue(String expression) throws CDIException;
+
+ /**
+ * Sets the value of this variable to the given value.
+ *
+ * @param value - a new value
+ * @throws CDIException if this method fails. Reasons include:
+ */
+ void setValue(ICDIValue value) throws CDIException;
+
+ /**
+ * Remove the variable from the manager list.
+ *
+ * @param var
+ * @return ICDIArgument
+ * @throws CDIException
+ */
+ void dispose() throws CDIException;
+
+ boolean equals(ICDIRegister reg);
+
}
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java
index 418b0362f78..ddde8e1bcd8 100644
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java
+++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java
@@ -40,7 +40,29 @@ public interface ICDIStackFrame extends ICDIExecuteStepReturn, ICDIObject {
* @throws CDIException if this method fails. Reasons include:
*/
ICDILocalVariableDescriptor[] getLocalVariableDescriptors() throws CDIException;
-
+
+ /**
+ * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
+ * ChangedEvent will also be trigger when the variable is assign a new value.
+ * DestroyedEvent is fired when the variable is out of scope and automatically
+ * removed from the manager list.
+ * @param varDesc ICDThreadStorageDesc
+ * @return
+ * @throws CDIException
+ */
+ ICDIArgument createArgument(ICDIArgumentDescriptor varDesc) throws CDIException;
+
+ /**
+ * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
+ * ChangedEvent will also be trigger when the variable is assign a new value.
+ * DestroyedEvent is fired when the variable is out of scope and automatically
+ * removed from the manager list.
+ * @param varDesc ICDThreadStorageDesc
+ * @return
+ * @throws CDIException
+ */
+ ICDILocalVariable createLocalVariable(ICDILocalVariableDescriptor varDesc) throws CDIException;
+
/**
* Returns the arguments in this stack frame. An empty collection
* is returned if there are no arguments.
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
index b9df1c67d6c..baf316edd20 100644
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
+++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
@@ -77,10 +77,22 @@ public interface ICDITarget extends ICDIThreadGroup, ICDIExpressionManagement,
* @param filename
* @param function
* @param name
- * @return ICDIVariableDescriptor
+ * @return ICDIGlobalVariableDescriptor
* @throws CDIException
*/
- ICDIVariableDescriptor getGlobalVariableDescriptors(String filename, String function, String name) throws CDIException;
+ ICDIGlobalVariableDescriptor getGlobalVariableDescriptors(String filename, String function, String name) throws CDIException;
+
+ /**
+ * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
+ * ChangedEvent will also be trigger when the variable is assign a new value.
+ * DestroyedEvent is fired when the variable is out of scope and automatically
+ * removed from the manager list.
+ *
+ * @param varDesc ICDIGlobalVariableDescriptor
+ * @return ICDIGlobalVariable
+ * @throws CDIException
+ */
+ ICDIGlobalVariable createGlobalVariable(ICDIGlobalVariableDescriptor varDesc) throws CDIException;
/**
* Return the register groups.
@@ -90,6 +102,17 @@ public interface ICDITarget extends ICDIThreadGroup, ICDIExpressionManagement,
ICDIRegisterGroup[] getRegisterGroups() throws CDIException;
/**
+ * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
+ * ChangedEvent will also be trigger when the variable is assign a new value.
+ * DestroyedEvent is fired when the variable is out of scope and automatically
+ * removed from the manager list.
+ * @param varDesc ICDThreadStorageDesc
+ * @return
+ * @throws CDIException
+ */
+ ICDIRegister createRegister(ICDIRegisterDescriptor varDesc) throws CDIException;
+
+ /**
* Returns whether this target is terminated.
*
* @return whether this target is terminated
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java
index f42ad7de76e..a9f27c869f8 100644
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java
+++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java
@@ -67,6 +67,17 @@ public interface ICDIThread extends ICDIExecuteStep, ICDIExecuteResume, ICDISusp
ICDIThreadStorageDescriptor[] getThreadStorageDescriptors() throws CDIException;
/**
+ * Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and
+ * ChangedEvent will also be trigger when the variable is assign a new value.
+ * DestroyedEvent is fired when the variable is out of scope and automatically
+ * removed from the manager list.
+ * @param varDesc ICDThreadStorageDesc
+ * @return
+ * @throws CDIException
+ */
+ ICDIThreadStorage createThreadStorage(ICDIThreadStorageDescriptor varDesc) throws CDIException;
+
+ /**
* Equivalent to resume(false)
*
* @deprecated
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java
index 84f4d3fa023..d8b32c80ec2 100644
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java
+++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariable.java
@@ -56,14 +56,6 @@ public interface ICDIVariable extends ICDIVariableDescriptor {
void setValue(ICDIValue value) throws CDIException;
/**
- * Set the format of the variable.
- *
- * @param format - @see ICDIFormat
- * @throws CDIException if this method fails.
- */
- void setFormat(int format) throws CDIException;
-
- /**
* Remove the variable from the manager list.
*
* @param var
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java
index 2c17895cc7b..dec935db4b7 100644
--- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java
+++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableDescriptor.java
@@ -79,17 +79,6 @@ public interface ICDIVariableDescriptor extends ICDIObject {
ICDIVariableDescriptor getVariableDescriptorAsType(String type) throws CDIException;
/**
- * Create a Variable for evaluation. A CreatedEvent will be trigger and
- * ChangedEvent will also be trigger when the variable is assign a new value.
- * DestroyedEvent is fired when the variable is out of scope and automatically
- * removed from the manager list.
- * @param var
- * @return ICDIVariable
- * @throws CDIException
- */
- ICDIVariable createVariable() throws CDIException;
-
- /**
* Returns true if the variable Object are the same,
* For example event if the name is the same because of
* casting this may return false;

Back to the top