cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IExpressions.java
author ryall
Tue, 12 Jan 2010 07:49:28 -0600
changeset 129 723898599d35
parent 105 fbceb3d6fb44
permissions -rw-r--r--
Bug 299167, turn the Variable View's Address column into a Location column.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     1
/*******************************************************************************
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     2
 * Copyright (c) 2006, 2008 Wind River Systems and others.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     3
 * All rights reserved. This program and the accompanying materials
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     4
 * are made available under the terms of the Eclipse Public License v1.0
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     5
 * which accompanies this distribution, and is available at
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     6
 * http://www.eclipse.org/legal/epl-v10.html
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     7
 * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     8
 * Contributors:
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
     9
 *     Wind River Systems - initial API and implementation
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    10
 *     Ericsson           - Update for GDB/MI
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    11
 *******************************************************************************/
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    12
package org.eclipse.cdt.dsf.debug.service;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    13
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    14
import java.math.BigInteger;
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    15
import java.util.Map;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    16
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    17
import org.eclipse.cdt.core.IAddress;
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    18
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    19
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    20
import org.eclipse.cdt.dsf.datamodel.IDMContext;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    21
import org.eclipse.cdt.dsf.datamodel.IDMData;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    22
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    23
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    24
/**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    25
 * Expressions service provides access to the debugger's expression evaluator. This service has
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    26
 * dependencies on the Stack service, as it is be used to provide context for an 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    27
 * expression to be evaluated.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    28
 * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    29
 * @since 1.0
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    30
 */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    31
@SuppressWarnings("nls")
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    32
public interface IExpressions extends IFormattedValues {
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    33
    
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    34
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    35
     * Expression context.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    36
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    37
    public interface IExpressionDMContext extends IFormattedDataDMContext {
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    38
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    39
         * Returns a fully qualified expression string represented by this context.  This 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    40
         * expression string is the same as the string that is sent to the debug engine to be
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    41
         * evaluated in context of a stack frame, thread, or a symbol context.   
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    42
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    43
        String getExpression();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    44
    }
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    45
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    46
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    47
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    48
     * The address and size of an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    49
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    50
    public interface IExpressionDMAddress {
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    51
        
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    52
        /**
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    53
         * Returns the address of the expression.
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    54
         */
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    55
    	IAddress getAddress();
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    56
    	
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    57
    	/**
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    58
    	 * Returns the size of the address.
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    59
    	 */
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    60
    	int getSize();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
    61
    }
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    62
 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    63
    /**
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    64
     * A representation of an expression location that does not correspond to 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    65
     * an address.  
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    66
     * 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    67
     * @since 2.1
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    68
     */
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    69
    public interface IExpressionDMLocation extends IExpressionDMAddress {
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    70
        
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    71
        /**
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    72
         * A constant that can be returned by {@link IExpressionDMAddress#getAddress()}
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    73
         * to represent an invalid address.  Implementations of 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    74
         * <code>IExpressionDMLocation</code> can return this constant if no  
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    75
         * valid address can be returned for a given expression location.  
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    76
         */
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    77
        public static final IAddress INVALID_ADDRESS = new IAddress() {
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    78
            public IAddress add(BigInteger offset) { return this; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    79
            public IAddress add(long offset) { return this; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    80
            public BigInteger getMaxOffset() { return BigInteger.ZERO; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    81
            public BigInteger distanceTo(IAddress other) { return BigInteger.ZERO; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    82
            public BigInteger getValue() { return BigInteger.ZERO; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    83
            public boolean isZero() { return false; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    84
            public boolean isMax() { return false; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    85
            public String toString(int radix) { return "INVALID"; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    86
            public String toHexAddressString() { return toString(); }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    87
            public String toBinaryAddressString()  { return toString(); }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    88
            public int getCharsNum() { return 0; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    89
            public int getSize() { return 0; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    90
            public int compareTo(Object o) { return 0; }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    91
        };
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    92
        
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    93
        /**
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    94
         * Returns a string representation of the expression location.
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    95
         */
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    96
    	public String getLocation();
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    97
    }
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    98
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
    99
    
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   100
    
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   101
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   102
     * This is the model data interface that corresponds to IExpressionDMContext.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   103
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   104
    public interface IExpressionDMData extends IDMData {
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   105
        // These static fields define the possible return values of method getTypeId().
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   106
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   107
        final static String TYPEID_UNKNOWN = "TYPEID_UNKNOWN";
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   108
        final static String TYPEID_INTEGER = "TYPEID_INTEGER";
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   109
        final static String TYPEID_CHAR = "TYPEID_CHAR";
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   110
        final static String TYPEID_FLOAT = "TYPEID_FLOAT";
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   111
        final static String TYPEID_DOUBLE = "TYPEID_DOUBLE";
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   112
        final static String TYPEID_OPAQUE = "TYPEID_OPAQUE";
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   113
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   114
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   115
         * This enumerates the possible basic types that an expression can have.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   116
         * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   117
         * @see getBasicType().
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   118
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   119
        enum BasicType {
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   120
            unknown,                // Unknown type.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   121
            basic,                  // Scalar type (e.g., int, short, float).
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   122
            pointer,                // Pointer to anything.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   123
            array,                  // Array of anything.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   124
            composite,              // Struct, union, or class.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   125
            enumeration,            // Enumeration.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   126
            function                // Function.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   127
        }
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   128
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   129
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   130
         * If this expression is a sub-expression of another expression, this method returns 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   131
         * the expression relative to the parent of this expression.  Otherwise this method 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   132
         * will return the same string as {@link #getExpression()}. 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   133
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   134
        String getName();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   135
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   136
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   137
         * @return A BasicType enumerator describing the basic type of an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   138
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   139
        BasicType getBasicType();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   140
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   141
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   142
         * @return The source code type of this expression.  This is a string such as "struct Foo", "short",
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   143
         *         "int *", "mytypedef", "(int *)[]", "enum Bar".  If the debugger backend cannot supply
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   144
         *         this information, this method returns "<UNKNOWN>" (the angle brackets are there just in
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   145
         *         case there is a type named "UNKNOWN" in the application).
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   146
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   147
        String getTypeName();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   148
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   149
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   150
         * This method needs to be defined.  For now, this returns the empty string.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   151
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   152
        String getEncoding();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   153
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   154
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   155
         * @return One of the TYPEID_* static field values defined by this interface.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   156
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   157
        String getTypeId();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   158
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   159
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   160
         * @return A Map in which the keys are strings that are the names of enumerators in the enumeration
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   161
         *         that is the value of this expression and the values are the integer values of the
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   162
         *         enumerators.  If the expression type is not an enumeration, this returns an empty Map.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   163
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   164
        Map<String, Integer> getEnumerations();
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   165
        
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   166
        /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   167
         * This method needs to be defined.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   168
         */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   169
        IRegisters.IRegisterDMContext getRegister();    
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   170
    }
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   171
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   172
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   173
     * Event indicating that a given expression is changed. If an expression is changed, it's implied that all
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   174
     * the children of that expression are changed too.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   175
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   176
    public interface IExpressionChangedDMEvent extends IDMEvent<IExpressionDMContext> {}
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   177
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   178
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   179
     * Retrieves the expression DM data object for the given expression context(<tt>dmc</tt>).
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   180
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   181
     * @param dmc
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   182
     *            The ExpressionDMC for the expression to be evaluated.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   183
     * @param rm
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   184
     *            The data request monitor that will contain the requested data
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   185
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   186
    void getExpressionData(IExpressionDMContext dmc, DataRequestMonitor<IExpressionDMData> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   187
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   188
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   189
     * Retrieves the address and size of an expression given by the expression context(<tt>dmc</tt>).
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   190
     * Non-lvalues do not have an addresses (e.g., "x + 5").  When the expression
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   191
-    * has no address, the request monitor will have an error with code 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   192
     * <code>IDsfStatusConstants.REQUEST_FAILED</code> and the data request
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   193
     * monitor will contain null.
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   194
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   195
     * @param dmc
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   196
     *            The ExpressionDMC for the expression
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   197
     * @param rm
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   198
     *            The data request monitor that will contain the requested data
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   199
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   200
    void getExpressionAddressData(IExpressionDMContext dmc, DataRequestMonitor<IExpressionDMAddress> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   201
    
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   202
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   203
     * Returns the data model context object for the specified expression in the context
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   204
     * specified by <b>ctx</b>.   
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   205
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   206
     * @param ctx: Context in which to evaluate the expression.  This context could include the
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   207
     * PC location, stack frame, thread, or just a symbol context.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   208
     *                
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   209
     * @param expression: The expression to evaluate.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   210
     * 
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   211
     * @return  An expression data model context object that must be passed to the appropriate
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   212
     *          data retrieval routine to obtain the value of the expression.
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   213
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   214
    IExpressionDMContext createExpression(IDMContext ctx, String expression);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   215
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   216
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   217
     * Retrieves the sub-expressions of the given expression.  Sub-expressions are fields of a struct, union,
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   218
     * or class, the enumerators of an enumeration, and the element of an array.
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   219
     * <br> 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   220
     * Note: Clients may call this method on any valid expression context, and before calling any other
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   221
     * method to evaluate the expression value.  It is up to the implementation to internally evaluate the 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   222
     * expression if needed, in order to calculate sub expressions.    
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   223
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   224
     * @param exprCtx: The data model context representing an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   225
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   226
     * @param rm: Request completion monitor containing an array of all sub-expressions   
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   227
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   228
    void getSubExpressions(IExpressionDMContext exprCtx, DataRequestMonitor<IExpressionDMContext[]> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   229
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   230
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   231
     * Retrieves a particular range of sub-expressions of the given expression.  
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   232
     * Sub-expressions are fields of a struct, union, or class, the enumerators 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   233
     * of an enumeration, and the element of an array.
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   234
     * <br> 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   235
     * Note: Clients may call this method on any valid expression context, and before calling any other
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   236
     * method to evaluate the expression value.  It is up to the implementation to internally evaluate the 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   237
     * expression if needed, in order to calculate sub expressions.    
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   238
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   239
     * @param exprCtx: The data model context representing an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   240
     *        startIndex: Index of the first sub-expression to retrieve
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   241
     *        length: Total number of sub-expressions to retrieve
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   242
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   243
     * @param rm: Request completion monitor containing an array of the requested
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   244
     *            range of sub-expressions
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   245
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   246
    void getSubExpressions(IExpressionDMContext exprCtx, int startIndex, int length, 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   247
    		DataRequestMonitor<IExpressionDMContext[]> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   248
    
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   249
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   250
     * Retrieves the number of sub-expressions of the given expression.  Sub-expressions are fields of a struct, union,
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   251
     * or class, the enumerators of an enumeration, and the element of an array.
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   252
     * <br> 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   253
     * Note: Clients may call this method on any valid expression context, and before calling any other
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   254
     * method to evaluate the expression value.  It is up to the implementation to internally evaluate the 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   255
     * expression if needed, in order to calculate sub expressions.    
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   256
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   257
     * @param exprCtx: The data model context representing an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   258
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   259
     * @param rm: Request completion monitor containing the number of sub-expressions
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   260
     *            of the specified expression
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   261
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   262
    void getSubExpressionCount(IExpressionDMContext exprCtx, DataRequestMonitor<Integer> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   263
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   264
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   265
     * For object oriented languages, this method returns the expressions representing base types of
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   266
     * the given expression type.
129
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   267
     * <br> 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   268
     * Note: Clients may call this method on any valid expression context, and before calling any other
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   269
     * method to evaluate the expression value.  It is up to the implementation to internally evaluate the 
723898599d35 Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents: 105
diff changeset
   270
     * expression if needed, in order to calculate sub expressions.    
37
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   271
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   272
     * @param exprContext: The data model context representing an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   273
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   274
     * @param rm: Request completion monitor.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   275
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   276
    void getBaseExpressions(IExpressionDMContext exprContext, DataRequestMonitor<IExpressionDMContext[]> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   277
    
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   278
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   279
     * This method indicates if an expression can be written to.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   280
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   281
     * @param expressionContext: The data model context representing an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   282
     *
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   283
     * @param rm: Data Request monitor containing True if this expression's value can be edited.  False otherwise.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   284
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   285
    void canWriteExpression(IExpressionDMContext expressionContext, DataRequestMonitor<Boolean> rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   286
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   287
    /**
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   288
     * This method supports the writing/modifying the value of the expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   289
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   290
     * @param expressionContext: The data model context representing an expression.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   291
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   292
     * @param expressionValue: The new value of the expression as a String.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   293
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   294
     * @param formatId: The format ID specifying the format of parameter <b>expressionValue</b>.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   295
     * 
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   296
     * @param rm: Request completion monitor.
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   297
     */
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   298
    void writeExpression(IExpressionDMContext expressionContext, String expressionValue, String formatId, RequestMonitor rm);
c2bce6dd59e7 add cdt_6_0_x
cawthron
parents:
diff changeset
   299
}