mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
[268081] [disassembly] Weird disassembly view, patch by Dmitry Smirnov
This commit is contained in:
parent
55f642b6df
commit
cb1ba5688f
1 changed files with 20 additions and 12 deletions
|
@ -1837,10 +1837,10 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (DEBUG) System.out.println("retrieveDisassembly "+getAddressText(startAddress)+" "+lines+" lines"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
if (DEBUG) System.out.println("retrieveDisassembly "+getAddressText(startAddress)+" "+lines+" lines"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
retrieveDisassembly(startAddress, endAddress, lines, true);
|
retrieveDisassembly(startAddress, endAddress, lines, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveDisassembly(final BigInteger startAddress, BigInteger endAddress, final int linesHint, boolean mixed) {
|
private void retrieveDisassembly(final BigInteger startAddress, BigInteger endAddress, final int linesHint, boolean mixed, boolean ignoreFile) {
|
||||||
assert !fUpdatePending;
|
assert !fUpdatePending;
|
||||||
fUpdatePending = true;
|
fUpdatePending = true;
|
||||||
final int lines= linesHint + 2;
|
final int lines= linesHint + 2;
|
||||||
|
@ -1851,7 +1851,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
boolean insideActiveFrame= startAddress.equals(fFrameAddress);
|
boolean insideActiveFrame= startAddress.equals(fFrameAddress);
|
||||||
String file= null;
|
String file= null;
|
||||||
int lineNumber= -1;
|
int lineNumber= -1;
|
||||||
if (insideActiveFrame && fTargetFrameData != null) {
|
if (!ignoreFile && insideActiveFrame && fTargetFrameData != null) {
|
||||||
file= fTargetFrameData.getFile();
|
file= fTargetFrameData.getFile();
|
||||||
if (file != null && file.trim().length() == 0) {
|
if (file != null && file.trim().length() == 0) {
|
||||||
file= null;
|
file= null;
|
||||||
|
@ -1875,12 +1875,19 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!insertDisassembly(startAddress, data)) {
|
if (!insertDisassembly(startAddress, data)) {
|
||||||
// retry in non-mixed mode
|
// retry in non-mixed mode
|
||||||
retrieveDisassembly(startAddress, finalEndAddress, linesHint, false);
|
retrieveDisassembly(startAddress, finalEndAddress, linesHint, false, false);
|
||||||
}
|
}
|
||||||
}});
|
}});
|
||||||
} else {
|
} else {
|
||||||
final IStatus status= getStatus();
|
final IStatus status= getStatus();
|
||||||
if (status != null && !status.isOK()) {
|
if (status != null && !status.isOK()) {
|
||||||
|
if( finalFile != null ) {
|
||||||
|
asyncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
retrieveDisassembly(startAddress, finalEndAddress, linesHint, true, true);
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
else {
|
||||||
asyncExec(new Runnable() {
|
asyncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
doScrollLocked(new Runnable() {
|
doScrollLocked(new Runnable() {
|
||||||
|
@ -1890,6 +1897,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
});
|
});
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fUpdatePending= false;
|
fUpdatePending= false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue