mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 08:15:48 +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)
|
||||
*/
|
||||
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)
|
||||
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromOffset(java.math.BigInteger, long)
|
||||
*/
|
||||
public MemoryByte[] getBytesFromOffset( BigInteger unitOffset, long addressableUnits ) throws DebugException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return getBytesFromAddress(unitOffset.add(getBigBaseAddress()) , addressableUnits);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -1110,7 +1110,9 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
|
||||
try
|
||||
{
|
||||
getMemoryBlock().setValue(address.subtract(fParent.getBigBaseAddress()), byteValue);
|
||||
IMemoryBlockExtension block = getMemoryBlock();
|
||||
BigInteger offset = address.subtract(block.getBigBaseAddress());
|
||||
block.setValue(offset, byteValue);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue