1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 09:16:02 +02:00

2005-03-23 Alain Magloire

Change is the ICDIMemoryBlock&& ICDIMemoryManagement API
	* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java
	* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java
	* src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
This commit is contained in:
Alain Magloire 2005-03-23 22:35:56 +00:00
parent 8f2104f4f5
commit 02cff41bd7
4 changed files with 32 additions and 24 deletions

View file

@ -1,3 +1,9 @@
2005-03-23 Alain Magloire
Change is the ICDIMemoryBlock&& ICDIMemoryManagement API
* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlock.java
* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIMemoryBlockManagement.java
* src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
2005-03-21 Mikhail Khodjaiants
Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform.
* MappingSourceContainer.java: new

View file

@ -28,12 +28,11 @@ public interface ICDIMemoryBlock extends ICDIObject {
* Bit mask used to indicate a byte is read-only.
*/
public static final byte READ_ONLY = 0x01;
/**
* Bit mask used to indicate a byte is valid.
*/
public static final byte VALID = 0x02;
/**
* Returns the start address of this memory block.
@ -48,7 +47,12 @@ public interface ICDIMemoryBlock extends ICDIObject {
* @return the length of this memory block in bytes
*/
long getLength();
/**
* @return The size of each memory word in bytes.
*/
int getWordSize();
/**
* Returns the values of the bytes currently contained
* in this this memory block.

View file

@ -11,8 +11,6 @@
package org.eclipse.cdt.debug.core.cdi.model;
import java.math.BigInteger;
import org.eclipse.cdt.debug.core.cdi.CDIException;
/**
@ -26,24 +24,14 @@ public interface ICDIMemoryBlockManagement {
/**
* Returns a memory block specified by given identifier.
*
* total = units * wordSize;
* @param address
* @param length - how much for address
* @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(String address, int length)
throws CDIException;
/**
* Returns a memory block specified by given identifier.
*
* @param address
* @param length - how much for address
* @return a memory block with the specified identifier
* @throws CDIException on failure. Reasons include:
*/
ICDIMemoryBlock createMemoryBlock(BigInteger address, int length)
ICDIMemoryBlock createMemoryBlock(String address, int units, int wordSize)
throws CDIException;
/**

View file

@ -57,13 +57,24 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
private HashSet fChanges = new HashSet();
private int fWordSize;
/**
* Constructor for CMemoryBlockExtension.
*/
public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress ) {
this(target, expression, baseAddress, 1);
}
/**
* Constructor for CMemoryBlockExtension.
*/
public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress, int wordSize ) {
super( target );
fExpression = expression;
fBaseAddress = baseAddress;
fWordSize = wordSize;
}
/* (non-Javadoc)
@ -127,7 +138,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
disposeCDIBlock();
fBytes = null;
}
setCDIBlock( createCDIBlock( address, length ) );
setCDIBlock( createCDIBlock( address, length, fWordSize ) );
}
bytes = getCDIBlock().getBytes();
}
@ -246,8 +257,8 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
}
}
private ICDIMemoryBlock createCDIBlock( BigInteger address, long length ) throws CDIException {
ICDIMemoryBlock block = ((CDebugTarget)getDebugTarget()).getCDITarget().createMemoryBlock( address.toString(), (int)length );
private ICDIMemoryBlock createCDIBlock( BigInteger address, long length, int wordSize ) throws CDIException {
ICDIMemoryBlock block = ((CDebugTarget)getDebugTarget()).getCDITarget().createMemoryBlock( address.toString(), (int)length, wordSize );
block.setFrozen( false );
getCDISession().getEventManager().addEventListener( this );
return block;
@ -390,8 +401,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressibleSize()
*/
public int getAddressibleSize() {
// TODO Auto-generated method stub
return 0;
return fWordSize;
}
/* (non-Javadoc)