diff options
author | John Cortell | 2007-02-09 14:24:05 +0000 |
---|---|---|
committer | John Cortell | 2007-02-09 14:24:05 +0000 |
commit | df61873f6dc834d10baf04e29cc7016823be8ae0 (patch) | |
tree | 6de4e92280cfe6e747b64e9d5cc40927e75ea6f8 /debug/org.eclipse.cdt.debug.core/cdi | |
parent | 88be86e73054ceedec372c00f27c6809d2967cc5 (diff) | |
download | org.eclipse.cdt-df61873f6dc834d10baf04e29cc7016823be8ae0.tar.gz org.eclipse.cdt-df61873f6dc834d10baf04e29cc7016823be8ae0.tar.xz org.eclipse.cdt-df61873f6dc834d10baf04e29cc7016823be8ae0.zip |
Correct improper handling and general confusion of the addressable size concept in the memory APIs (173420)
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core/cdi')
3 files changed, 17 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java index 33c66a6c999..c46980965f3 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java @@ -49,7 +49,15 @@ public interface ICDIMemoryBlock extends ICDIObject { long getLength(); /** - * @return The size of each memory word in bytes. + * This method is a misnomer. It should be getAddressableSize. This is how + * CDT finds out from the CDI client the addressable size of the + * memory--i.e., how many bytes per address. Some embedded systems have + * memory with addressable sizes >1. Such backends should make sure to + * ignore the now deprecated wordSize parameter of + * ICDIMemoryBlockManagement.createMemory block() and not regurgitate that + * value in the implementation of this method. + * + * @return The addressable size of the memory */ int getWordSize(); diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java index 0be1511d5c4..22d679df4f1 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java @@ -25,8 +25,13 @@ public interface ICDIMemoryBlockManagement { /** * Returns a memory block specified by given identifier. * @param address - * @param units - number of units - * @param wordSize - The size of each memory word in bytes + * @param units - number of bytes + * @param wordSize - this parameter has been deprecated in 4.0 + * and will always be passed as the value 1. If the memory + * has an addressable size (number of bytes per address) + * greather than 1, the CDI client should take care not to + * return the value of wordSize we pass in here, but rather + * return the actual addressable size for that memory. * @return a memory block with the specified identifier * @throws CDIException on failure. Reasons include: */ diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java index 9689fbb65e6..fbda1058bc7 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement2.java @@ -28,10 +28,9 @@ public interface ICDIMemoryBlockManagement2 extends ICDIMemoryBlockManagement { * @param address * @param memorySpaceID - value is meaningful only to the backend * @param units - number of units - * @param wordSize - The size of each memory word in bytes * @return a memory block with the specified identifier * @throws CDIException on failure. Reasons include: */ - ICDIMemoryBlock createMemoryBlock(BigInteger address, String memorySpaceID, int units, int wordSize) + ICDIMemoryBlock createMemoryBlock(BigInteger address, String memorySpaceID, int units) throws CDIException; } |