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

Bug 573688: Compare flags for the same address

Contributed by STMicroelectronics

Change-Id: I4a7ea55b341653bbf01b9e69b3129023278104f9
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
Torbjörn Svensson 2021-05-28 16:34:48 +02:00
parent 224b14318b
commit 50dcf3dbfa

View file

@ -399,7 +399,7 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
if (i < newLength) { if (i < newLength) {
newBlock[i].setHistoryKnown(true); newBlock[i].setHistoryKnown(true);
if (newBlock[i].getValue() != fBlock[distance + i].getValue() if (newBlock[i].getValue() != fBlock[distance + i].getValue()
|| newBlock[distance + i].getFlags() != fBlock[i].getFlags()) { || isReadableFlagSet(newBlock[i]) != isReadableFlagSet(fBlock[distance + i])) {
newBlock[i].setChanged(true); newBlock[i].setChanged(true);
} }
} }
@ -484,7 +484,7 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
if ((distance + i) < newLength) { if ((distance + i) < newLength) {
newBlock[distance + i].setHistoryKnown(true); newBlock[distance + i].setHistoryKnown(true);
if (newBlock[distance + i].getValue() != fBlock[i].getValue() if (newBlock[distance + i].getValue() != fBlock[i].getValue()
|| newBlock[distance + i].getFlags() != fBlock[i].getFlags()) { || isReadableFlagSet(newBlock[distance + i]) != isReadableFlagSet(fBlock[i])) {
newBlock[distance + i].setChanged(true); newBlock[distance + i].setChanged(true);
} }
} }
@ -509,6 +509,10 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
return fBlock; return fBlock;
} }
private boolean isReadableFlagSet(MemoryByte mb) {
return (mb.getFlags() & MemoryByte.READABLE) != 0;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#setValue(java.math.BigInteger, byte[]) * @see org.eclipse.debug.core.model.IMemoryBlockExtension#setValue(java.math.BigInteger, byte[])
*/ */