mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
[299019] CMemoryBlockExtension does not correctly implement IMemoryBlockExtension#setBaseAddress. Applied patch with some modifications.
This commit is contained in:
parent
df738ce07d
commit
6d324d7f03
2 changed files with 10 additions and 3 deletions
|
@ -175,14 +175,19 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#setBaseAddress(java.math.BigInteger)
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#setBaseAddress(java.math.BigInteger)
|
||||||
*/
|
*/
|
||||||
public void setBaseAddress( BigInteger address ) throws DebugException {
|
public void setBaseAddress( BigInteger address ) throws DebugException {
|
||||||
|
BigInteger current = fBaseAddress;
|
||||||
|
if (current == address || (current != null && current.equals(address))) {
|
||||||
|
return; // optimization
|
||||||
|
}
|
||||||
|
fBaseAddress = address;
|
||||||
|
fireChangeEvent(DebugEvent.STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromOffset(java.math.BigInteger, long)
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromOffset(java.math.BigInteger, long)
|
||||||
*/
|
*/
|
||||||
public MemoryByte[] getBytesFromOffset( BigInteger unitOffset, long addressableUnits ) throws DebugException {
|
public MemoryByte[] getBytesFromOffset( BigInteger unitOffset, long addressableUnits ) throws DebugException {
|
||||||
// TODO Auto-generated method stub
|
return getBytesFromAddress(unitOffset.add(getBigBaseAddress()) , addressableUnits);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -1110,7 +1110,9 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getMemoryBlock().setValue(address.subtract(fParent.getBigBaseAddress()), byteValue);
|
IMemoryBlockExtension block = getMemoryBlock();
|
||||||
|
BigInteger offset = address.subtract(block.getBigBaseAddress());
|
||||||
|
block.setValue(offset, byteValue);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue