Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Williams2009-03-14 06:00:46 +0000
committerTed Williams2009-03-14 06:00:46 +0000
commit76dff041945be5c7f899a7250cb646bcaef83b6c (patch)
tree5386cc30b30644bb11bcd3abd6e5a53c993a124a /memory/org.eclipse.cdt.debug.ui.memory.traditional
parent25b0ee6d2eb2e56dfa81ab59cec357ae5413d407 (diff)
downloadorg.eclipse.cdt-76dff041945be5c7f899a7250cb646bcaef83b6c.tar.gz
org.eclipse.cdt-76dff041945be5c7f899a7250cb646bcaef83b6c.tar.xz
org.eclipse.cdt-76dff041945be5c7f899a7250cb646bcaef83b6c.zip
[262680] [memory] OutOfMemory exception in traditional rendering
Diffstat (limited to 'memory/org.eclipse.cdt.debug.ui.memory.traditional')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
index 51b14d57222..7daca8ec32b 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
@@ -859,12 +859,12 @@ public class Rendering extends Composite implements IDebugEventSetListener
{
try
{
- final IMemoryBlockExtension memoryBlock = getMemoryBlock();
+ IMemoryBlockExtension memoryBlock = getMemoryBlock();
- final BigInteger lengthInBytes = endAddress.subtract(startAddress);
- final BigInteger addressableSize = BigInteger.valueOf(getAddressableSize());
+ BigInteger lengthInBytes = endAddress.subtract(startAddress);
+ BigInteger addressableSize = BigInteger.valueOf(getAddressableSize());
- final long units = lengthInBytes.divide(addressableSize).add(
+ long units = lengthInBytes.divide(addressableSize).add(
lengthInBytes.mod(addressableSize).compareTo(BigInteger.ZERO) > 0
? BigInteger.ONE : BigInteger.ZERO).longValue();
@@ -873,9 +873,8 @@ public class Rendering extends Composite implements IDebugEventSetListener
// change history. Ideally, we should strictly use the back end change notification
// and history, but it is only guaranteed to work for bytes within the address range
// of the MemoryBlock.
- final MemoryByte readBytes[] = memoryBlock
- .getBytesFromAddress(startAddress, units);
-
+ MemoryByte readBytes[] = memoryBlock.getBytesFromAddress(startAddress, units);
+
TraditionalMemoryByte cachedBytes[] = new TraditionalMemoryByte[readBytes.length];
for(int i = 0; i < readBytes.length; i++)
cachedBytes[i] = new TraditionalMemoryByte(readBytes[i].getValue(), readBytes[i].getFlags());
@@ -905,8 +904,14 @@ public class Rendering extends Composite implements IDebugEventSetListener
cachedBytes = cachedBytesAsByteSequence;
}
}
-
+
final TraditionalMemoryByte[] cachedBytesFinal = cachedBytes;
+
+ fCache = new MemoryUnit();
+ fCache.start = startAddress;
+ fCache.end = endAddress;
+ fCache.bytes = cachedBytesFinal;
+
Display.getDefault().asyncExec(new Runnable()
{
public void run()
@@ -943,11 +948,6 @@ public class Rendering extends Composite implements IDebugEventSetListener
}
}
}
-
- fCache = new MemoryUnit();
- fCache.start = startAddress;
- fCache.end = endAddress;
- fCache.bytes = cachedBytesFinal;
// If the history does not exist, populate the history with the just populated cache. This solves the
// use case of 1) connect to target; 2) edit memory before the first suspend debug event; 3) paint

Back to the top