mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46: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:
parent
8f2104f4f5
commit
02cff41bd7
4 changed files with 32 additions and 24 deletions
|
@ -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
|
2005-03-21 Mikhail Khodjaiants
|
||||||
Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform.
|
Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform.
|
||||||
* MappingSourceContainer.java: new
|
* MappingSourceContainer.java: new
|
||||||
|
|
|
@ -28,12 +28,11 @@ public interface ICDIMemoryBlock extends ICDIObject {
|
||||||
* Bit mask used to indicate a byte is read-only.
|
* Bit mask used to indicate a byte is read-only.
|
||||||
*/
|
*/
|
||||||
public static final byte READ_ONLY = 0x01;
|
public static final byte READ_ONLY = 0x01;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bit mask used to indicate a byte is valid.
|
* Bit mask used to indicate a byte is valid.
|
||||||
*/
|
*/
|
||||||
public static final byte VALID = 0x02;
|
public static final byte VALID = 0x02;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the start address of this memory block.
|
* 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
|
* @return the length of this memory block in bytes
|
||||||
*/
|
*/
|
||||||
long getLength();
|
long getLength();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The size of each memory word in bytes.
|
||||||
|
*/
|
||||||
|
int getWordSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the values of the bytes currently contained
|
* Returns the values of the bytes currently contained
|
||||||
* in this this memory block.
|
* in this this memory block.
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.core.cdi.model;
|
package org.eclipse.cdt.debug.core.cdi.model;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,24 +24,14 @@ public interface ICDIMemoryBlockManagement {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a memory block specified by given identifier.
|
* Returns a memory block specified by given identifier.
|
||||||
*
|
* total = units * wordSize;
|
||||||
* @param address
|
* @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
|
* @return a memory block with the specified identifier
|
||||||
* @throws CDIException on failure. Reasons include:
|
* @throws CDIException on failure. Reasons include:
|
||||||
*/
|
*/
|
||||||
ICDIMemoryBlock createMemoryBlock(String address, int length)
|
ICDIMemoryBlock createMemoryBlock(String address, int units, int wordSize)
|
||||||
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)
|
|
||||||
throws CDIException;
|
throws CDIException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,13 +57,24 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
|
|
||||||
private HashSet fChanges = new HashSet();
|
private HashSet fChanges = new HashSet();
|
||||||
|
|
||||||
|
private int fWordSize;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for CMemoryBlockExtension.
|
* Constructor for CMemoryBlockExtension.
|
||||||
*/
|
*/
|
||||||
public CMemoryBlockExtension( CDebugTarget target, String expression, BigInteger baseAddress ) {
|
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 );
|
super( target );
|
||||||
fExpression = expression;
|
fExpression = expression;
|
||||||
fBaseAddress = baseAddress;
|
fBaseAddress = baseAddress;
|
||||||
|
fWordSize = wordSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -127,7 +138,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
disposeCDIBlock();
|
disposeCDIBlock();
|
||||||
fBytes = null;
|
fBytes = null;
|
||||||
}
|
}
|
||||||
setCDIBlock( createCDIBlock( address, length ) );
|
setCDIBlock( createCDIBlock( address, length, fWordSize ) );
|
||||||
}
|
}
|
||||||
bytes = getCDIBlock().getBytes();
|
bytes = getCDIBlock().getBytes();
|
||||||
}
|
}
|
||||||
|
@ -246,8 +257,8 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ICDIMemoryBlock createCDIBlock( BigInteger address, long length ) throws CDIException {
|
private ICDIMemoryBlock createCDIBlock( BigInteger address, long length, int wordSize ) throws CDIException {
|
||||||
ICDIMemoryBlock block = ((CDebugTarget)getDebugTarget()).getCDITarget().createMemoryBlock( address.toString(), (int)length );
|
ICDIMemoryBlock block = ((CDebugTarget)getDebugTarget()).getCDITarget().createMemoryBlock( address.toString(), (int)length, wordSize );
|
||||||
block.setFrozen( false );
|
block.setFrozen( false );
|
||||||
getCDISession().getEventManager().addEventListener( this );
|
getCDISession().getEventManager().addEventListener( this );
|
||||||
return block;
|
return block;
|
||||||
|
@ -390,8 +401,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressibleSize()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressibleSize()
|
||||||
*/
|
*/
|
||||||
public int getAddressibleSize() {
|
public int getAddressibleSize() {
|
||||||
// TODO Auto-generated method stub
|
return fWordSize;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue