mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 428121 - Can't force refresh of the disassembly on a different address
This commit is contained in:
parent
7d147536f3
commit
b3b36231e3
1 changed files with 17 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2013 Wind River Systems and others.
|
* Copyright (c) 2007, 2014 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -278,7 +278,6 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
private volatile int fUpdateCount;
|
private volatile int fUpdateCount;
|
||||||
private BigInteger fPCAddress;
|
private BigInteger fPCAddress;
|
||||||
private BigInteger fGotoAddressPending= PC_UNKNOWN;
|
private BigInteger fGotoAddressPending= PC_UNKNOWN;
|
||||||
private boolean fGotoAddressOnTop;
|
|
||||||
private BigInteger fFocusAddress= PC_UNKNOWN;
|
private BigInteger fFocusAddress= PC_UNKNOWN;
|
||||||
private int fBufferZone;
|
private int fBufferZone;
|
||||||
private String fDebugSessionId;
|
private String fDebugSessionId;
|
||||||
|
@ -1401,11 +1400,12 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final void gotoAddress(BigInteger address) {
|
public final void gotoAddress(BigInteger address) {
|
||||||
fFocusAddress = address;
|
|
||||||
if (fDebugSessionId == null) {
|
if (fDebugSessionId == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (DEBUG) System.out.println("gotoAddress " + getAddressText(address)); //$NON-NLS-1$
|
if (DEBUG) System.out.println("gotoAddress " + getAddressText(address)); //$NON-NLS-1$
|
||||||
|
fFocusAddress = address;
|
||||||
|
BigInteger previousAddress = fGotoAddressPending;
|
||||||
if (fGotoAddressPending == PC_UNKNOWN) {
|
if (fGotoAddressPending == PC_UNKNOWN) {
|
||||||
fGotoAddressPending = address;
|
fGotoAddressPending = address;
|
||||||
}
|
}
|
||||||
|
@ -1415,19 +1415,22 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
AddressRangePosition pos = getPositionOfAddress(address);
|
AddressRangePosition pos = getPositionOfAddress(address);
|
||||||
if (pos != null) {
|
if (pos != null) {
|
||||||
if (pos.fValid) {
|
if (pos.fValid) {
|
||||||
boolean onTop = false;
|
if ((pos instanceof ErrorPosition || !pos.fAddressOffset.equals(address)) && !previousAddress.equals(address)) {
|
||||||
if (fGotoAddressPending.equals(address)) {
|
// address is within a disassembled instruction or error - need to invalidate
|
||||||
fGotoAddressPending = PC_UNKNOWN;
|
pos.fValid = false;
|
||||||
onTop = fGotoAddressOnTop;
|
fDocument.addInvalidAddressRange(pos);
|
||||||
fGotoAddressOnTop = false;
|
} else {
|
||||||
|
if (fGotoAddressPending.equals(address)) {
|
||||||
|
fGotoAddressPending = PC_UNKNOWN;
|
||||||
|
}
|
||||||
|
gotoPosition(pos, !address.equals(fFrameAddress));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
gotoPosition(pos, onTop);
|
|
||||||
} else {
|
|
||||||
int lines = fBufferZone+3;
|
|
||||||
BigInteger endAddress = pos.fAddressOffset.add(pos.fAddressLength).min(
|
|
||||||
address.add(BigInteger.valueOf(lines * fDocument.getMeanSizeOfInstructions())));
|
|
||||||
retrieveDisassembly(address, endAddress, lines);
|
|
||||||
}
|
}
|
||||||
|
int lines = fBufferZone+3;
|
||||||
|
BigInteger endAddress = pos.fAddressOffset.add(pos.fAddressLength).min(
|
||||||
|
address.add(BigInteger.valueOf(lines * fDocument.getMeanSizeOfInstructions())));
|
||||||
|
retrieveDisassembly(address, endAddress, lines);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2038,7 +2041,6 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
fTargetFrame = targetFrame;
|
fTargetFrame = targetFrame;
|
||||||
fFrameAddress = frameAddress;
|
fFrameAddress = frameAddress;
|
||||||
fPCAddress = pcAddress;
|
fPCAddress = pcAddress;
|
||||||
fGotoAddressOnTop = true;
|
|
||||||
gotoAddress(topAddress);
|
gotoAddress(topAddress);
|
||||||
} else {
|
} else {
|
||||||
refreshView((int)(refreshViewScheduled - now));
|
refreshView((int)(refreshViewScheduled - now));
|
||||||
|
|
Loading…
Add table
Reference in a new issue