1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 573688: Do no inherit flags from cached blocks

Memory region may change access rights during the execution time. For
example, in embedded, a memory location might be clocked or not clocked
depending om some SFR. As the region can be changed during the
execution time, it's not enough to use the initial flags.

Contributed by STMicroelectronics

Change-Id: Ida4d6ed69faf3fb6e515aa0a29fa90ea241135dc
Also-By: Anders Jansson <anders.jansson-ext@st.com>
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
Torbjörn Svensson 2021-05-24 09:55:46 +02:00
parent b5969f2cb9
commit 6187228a08

View file

@ -397,9 +397,9 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
// Process each cell, updating the status and history/change
for (int i = 0; i < length; i++) {
if (i < newLength) {
newBlock[i].setFlags(fBlock[distance + i].getFlags());
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()) {
newBlock[i].setChanged(true);
}
}
@ -482,9 +482,9 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
// Process each cell, updating the status and history/change
for (int i = 0; i < length; i++) {
if ((distance + i) < newLength) {
newBlock[distance + i].setFlags(fBlock[i].getFlags());
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()) {
newBlock[distance + i].setChanged(true);
}
}
@ -613,7 +613,7 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
final Addr64 address = new Addr64(bigAddress);
// Use a Query to synchronize the downstream calls
Query<MemoryByte[]> query = new Query<MemoryByte[]>() {
Query<MemoryByte[]> query = new Query<>() {
@Override
protected void execute(final DataRequestMonitor<MemoryByte[]> drm) {
IMemory memoryService = fRetrieval.getServiceTracker().getService();
@ -669,7 +669,7 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
final Addr64 address = new Addr64(fBaseAddress);
// Use a Query to synchronize the downstream calls
Query<MemoryByte[]> query = new Query<MemoryByte[]>() {
Query<MemoryByte[]> query = new Query<>() {
@Override
protected void execute(final DataRequestMonitor<MemoryByte[]> drm) {
IMemory memoryService = fRetrieval.getServiceTracker().getService();