Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLing Wang2013-08-07 06:32:48 +0000
committerMarc Khouzam2014-02-28 20:34:59 +0000
commit06854adaefc92d257834439052a2ffcbfa720ed3 (patch)
treeaaaed3da88cf3bb1a120e4ad75940a2175b1d3f2 /memory/org.eclipse.cdt.debug.ui.memory.floatingpoint
parentf7d49e5bdec79ea4bcec4424484b81847c3c43a9 (diff)
downloadorg.eclipse.cdt-06854adaefc92d257834439052a2ffcbfa720ed3.tar.gz
org.eclipse.cdt-06854adaefc92d257834439052a2ffcbfa720ed3.tar.xz
org.eclipse.cdt-06854adaefc92d257834439052a2ffcbfa720ed3.zip
Bug 414519: [Memory View] user specified start address is not honored.
Change-Id: I0e72b6a4d685197191427c93b67b9a96d80da682 Signed-off-by: Ling Wang <ling.wang@silabs.com> Reviewed-on: https://git.eclipse.org/r/15214 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'memory/org.eclipse.cdt.debug.ui.memory.floatingpoint')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
index bf6ba9cdecd..625c6562c4b 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2014 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -167,13 +167,24 @@ public class Rendering extends Composite implements IDebugEventSetListener
if (fParent.getMemoryBlock() != null)
{
+ // This is base address from user.
+ // Honor it if the block has no limits or the base is within the block limits.
+ // Fix Bug 414519.
+ BigInteger base = fParent.getBigBaseAddress();
+
fViewportAddress = fParent.getMemoryBlockStartAddress();
// The viewport address will be null if memory may be retrieved at any
// address less than this memory block's base. If so use the base address.
-
if (fViewportAddress == null)
- fViewportAddress = fParent.getBigBaseAddress();
+ fViewportAddress = base;
+ else {
+ BigInteger blockEndAddr = fParent.getMemoryBlockEndAddress();
+ if (base.compareTo(fViewportAddress) > 0) {
+ if (blockEndAddr == null || base.compareTo(blockEndAddr) < 0)
+ fViewportAddress = base;
+ }
+ }
fBaseAddress = fViewportAddress;
}
@@ -755,10 +766,10 @@ public class Rendering extends Composite implements IDebugEventSetListener
}
@SuppressWarnings("hiding")
- private HashMap<BigInteger, FPMemoryByte[]> fEditBuffer = new HashMap<BigInteger, FPMemoryByte[]>();
+ private HashMap<BigInteger, FPMemoryByte[]> fEditBuffer = new HashMap<>();
private boolean fDisposed = false;
private Object fLastQueued = null;
- private Vector<Object> fQueue = new Vector<Object>();
+ private Vector<Object> fQueue = new Vector<>();
protected MemoryUnit fCache = null;
protected MemoryUnit fHistoryCache[] = new MemoryUnit[0];
protected int fHistoryDepth = 0;

Back to the top