mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Implementing the memory view.
This commit is contained in:
parent
7c6cf4d75f
commit
873f660e03
3 changed files with 36 additions and 11 deletions
|
@ -1,3 +1,7 @@
|
|||
2002-10-27 Mikhail Khodjaiants
|
||||
* IFormattedMemoryBlock.java: added the 'setItemValue' method.
|
||||
* CFormattedMemoryBlock.java: implementation of the 'setItemValue' method.
|
||||
|
||||
2002-10-16 Alain Magloire
|
||||
|
||||
* src/.../core/cdi/model/ICDIMemoryBlock.java (refresh):
|
||||
|
|
|
@ -85,6 +85,18 @@ public interface IFormattedMemoryBlock extends IMemoryBlock
|
|||
*/
|
||||
IFormattedMemoryBlockRow[] getRows();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of data item in this block at the specified
|
||||
* index within this block to the spcified value.
|
||||
* The index is zero based.
|
||||
*
|
||||
* @param index the index of item to change
|
||||
* @param newValue the new value
|
||||
* @throws DebugException if this method fails. Reasons include:
|
||||
*/
|
||||
void setItemValue( int index, String newValue ) throws DebugException;
|
||||
|
||||
char getPaddingCharacter();
|
||||
|
||||
long nextRowAddress();
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package org.eclipse.cdt.debug.internal.core.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||
|
@ -83,6 +84,7 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
private char fPaddingChar = '.';
|
||||
private List fRows = null;
|
||||
private Long[] fChangedAddresses = new Long[0];
|
||||
private HashSet fDirtyBytes;
|
||||
|
||||
/**
|
||||
* Constructor for CFormattedMemoryBlock.
|
||||
|
@ -96,16 +98,7 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
int numberOfRows,
|
||||
int numberOfColumns )
|
||||
{
|
||||
super( target );
|
||||
fCDIMemoryBlock = cdiMemoryBlock;
|
||||
fAddressExpression = addressExpression;
|
||||
fFormat = format;
|
||||
fWordSize = wordSize;
|
||||
fNumberOfRows = numberOfRows;
|
||||
fNumberOfColumns = numberOfColumns;
|
||||
fDisplayAscii = false;
|
||||
fPaddingChar = 0;
|
||||
getCDISession().getEventManager().addEventListener( this );
|
||||
this( target, cdiMemoryBlock, addressExpression, format, wordSize, numberOfRows, numberOfColumns, '\0' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,6 +123,7 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
fNumberOfColumns = numberOfColumns;
|
||||
fDisplayAscii = true;
|
||||
fPaddingChar = paddingChar;
|
||||
fDirtyBytes = new HashSet();
|
||||
getCDISession().getEventManager().addEventListener( this );
|
||||
}
|
||||
|
||||
|
@ -353,6 +347,8 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
fCDIMemoryBlock = null;
|
||||
}
|
||||
getCDISession().getEventManager().removeEventListener( this );
|
||||
fDirtyBytes.clear();
|
||||
fDirtyBytes = null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -439,7 +435,8 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
|
||||
private void handleChangedEvent( ICDIMemoryChangedEvent event )
|
||||
{
|
||||
resetRows();
|
||||
resetRows();
|
||||
resetDirtyBytes();
|
||||
setChangedAddresses( event.getAddresses() );
|
||||
fireChangeEvent( DebugEvent.CONTENT );
|
||||
}
|
||||
|
@ -474,4 +471,16 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
{
|
||||
getCDIMemoryBlock().setFrozen( frozen );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.IFormattedMemoryBlock#setItemValue(int, String)
|
||||
*/
|
||||
public void setItemValue( int index, String newValue ) throws DebugException
|
||||
{
|
||||
}
|
||||
|
||||
private void resetDirtyBytes()
|
||||
{
|
||||
fDirtyBytes.clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue