Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2013-11-05 09:00:51 -0500
committerAnton Leherbauer2013-11-05 09:00:51 -0500
commit79b33999775ab676da4af56d1966fb8fae9a0985 (patch)
tree7d604a13f4cd62c91e5580909547364720413dc2
parentf70547c526a18715c71ad26349b38342fd816aa1 (diff)
downloadorg.eclipse.cdt-79b33999775ab676da4af56d1966fb8fae9a0985.tar.gz
org.eclipse.cdt-79b33999775ab676da4af56d1966fb8fae9a0985.tar.xz
org.eclipse.cdt-79b33999775ab676da4af56d1966fb8fae9a0985.zip
Bug 420604 - Disassembly view tends to scroll upwards on refresh
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index dbf601e331..01abbe867a 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 Wind River Systems and others.
+ * Copyright (c) 2007, 2013 Wind River Systems 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
@@ -277,6 +277,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
private volatile int fUpdateCount;
private BigInteger fPCAddress;
private BigInteger fGotoAddressPending= PC_UNKNOWN;
+ private boolean fGotoAddressOnTop;
private BigInteger fFocusAddress= PC_UNKNOWN;
private int fBufferZone;
private String fDebugSessionId;
@@ -1413,10 +1414,13 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
AddressRangePosition pos = getPositionOfAddress(address);
if (pos != null) {
if (pos.fValid) {
+ boolean onTop = false;
if (fGotoAddressPending.equals(address)) {
fGotoAddressPending = PC_UNKNOWN;
+ onTop = fGotoAddressOnTop;
+ fGotoAddressOnTop = false;
}
- gotoPosition(pos, false);
+ gotoPosition(pos, onTop);
} else {
int lines = fBufferZone+3;
BigInteger endAddress = pos.fAddressOffset.add(pos.fAddressLength).min(
@@ -2035,6 +2039,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
fTargetFrame = targetFrame;
fFrameAddress = frameAddress;
fPCAddress = pcAddress;
+ fGotoAddressOnTop = true;
gotoAddress(topAddress);
} else {
refreshView((int)(refreshViewScheduled - now));

Back to the top