|
Added
Link Here
|
| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2009 Wind River and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
| 8 |
* Contributors: |
| 9 |
* Wind River (Ted Williams) - initial API and implementation |
| 10 |
* IBM (Samantha Chan) - updated documentation, added getSize, subclass from IValue |
| 11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.debug.core.model; |
| 13 |
|
| 14 |
|
| 15 |
import java.math.BigInteger; |
| 16 |
|
| 17 |
import org.eclipse.debug.core.DebugException; |
| 18 |
|
| 19 |
/** |
| 20 |
* <code>IMemoryAddress</code> represents the value of an address in memory. |
| 21 |
* |
| 22 |
* This interface is introduced to allow clients to evaluate an expression to an |
| 23 |
* address without having to create an <code>IMemoryBlock</code>. To evaluate an |
| 24 |
* expression to an address, clients are expected to create an <code>IExpression</code> |
| 25 |
* from the expression manager. If the expression can be evaluated to an address, the returning |
| 26 |
* value of the expression should optionally implement this interface or be |
| 27 |
* able to adapt to an <code>IMemoryAddress</code> object. |
| 28 |
* |
| 29 |
* <p> |
| 30 |
* Clients may implement this interface. |
| 31 |
* </p> |
| 32 |
* @since 3.5 |
| 33 |
* @see org.eclipse.debug.core.IExpressionManager |
| 34 |
* @see org.eclipse.debug.core.model.IValue |
| 35 |
*/ |
| 36 |
|
| 37 |
|
| 38 |
public interface IMemoryAddress extends IValue { |
| 39 |
|
| 40 |
/** |
| 41 |
* Returns the value of the memory address as a <code>BigInteger</code>. |
| 42 |
* |
| 43 |
* @return a BigInteger representation of the memory address |
| 44 |
* @exception DebugException if this method fails. Reasons include: |
| 45 |
* <ul><li>Failure communicating with the VM. The DebugException's |
| 46 |
* status code contains the underlying exception responsible for |
| 47 |
* the failure.</li> |
| 48 |
*/ |
| 49 |
public BigInteger getValueAddress() throws DebugException; |
| 50 |
|
| 51 |
|
| 52 |
/** |
| 53 |
* Returns the address size in bytes. |
| 54 |
* |
| 55 |
* @return the number of bytes required to hold this address. |
| 56 |
*/ |
| 57 |
public int getSize(); |
| 58 |
|
| 59 |
} |