mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Disassembly view should blank out if there is no debug context, related to bug 337376
This commit is contained in:
parent
63ec2d8b00
commit
91c51e5113
1 changed files with 32 additions and 29 deletions
|
@ -1847,24 +1847,28 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
|
|
||||||
protected void updateDebugContext() {
|
protected void updateDebugContext() {
|
||||||
IAdaptable context = DebugUITools.getPartDebugContext(getSite());
|
IAdaptable context = DebugUITools.getPartDebugContext(getSite());
|
||||||
if (context != null) {
|
IDisassemblyBackend prevBackend = fBackend;
|
||||||
final IDisassemblyBackend prevBackend = fBackend;
|
IDisassemblyBackend newBackend = null;
|
||||||
fDebugSessionId = null;
|
fDebugSessionId = null;
|
||||||
boolean needUpdate = false;
|
boolean needUpdate = false;
|
||||||
if (prevBackend == null || !prevBackend.supportsDebugContext(context)) {
|
if (context != null) {
|
||||||
needUpdate = true;
|
if (prevBackend != null && prevBackend.supportsDebugContext(context)) {
|
||||||
fBackend = (IDisassemblyBackend)context.getAdapter(IDisassemblyBackend.class);
|
newBackend = prevBackend;
|
||||||
if (fBackend != null) {
|
|
||||||
if (fBackend.supportsDebugContext(context)) {
|
|
||||||
fBackend.init(this);
|
|
||||||
} else {
|
} else {
|
||||||
fBackend = null;
|
needUpdate = true;
|
||||||
|
newBackend = (IDisassemblyBackend)context.getAdapter(IDisassemblyBackend.class);
|
||||||
|
if (newBackend != null) {
|
||||||
|
if (newBackend.supportsDebugContext(context)) {
|
||||||
|
newBackend.init(this);
|
||||||
|
} else {
|
||||||
|
newBackend = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (fBackend != null) {
|
fBackend = newBackend;
|
||||||
IDisassemblyBackend.SetDebugContextResult result = fBackend.setDebugContext(context);
|
if (newBackend != null) {
|
||||||
|
IDisassemblyBackend.SetDebugContextResult result = newBackend.setDebugContext(context);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
fDebugSessionId = result.sessionId;
|
fDebugSessionId = result.sessionId;
|
||||||
if (result.contextChanged) {
|
if (result.contextChanged) {
|
||||||
|
@ -1872,7 +1876,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (prevBackend != null && fBackend != prevBackend) {
|
if (prevBackend != null && newBackend != prevBackend) {
|
||||||
needUpdate = true;
|
needUpdate = true;
|
||||||
prevBackend.clearDebugContext();
|
prevBackend.clearDebugContext();
|
||||||
prevBackend.dispose();
|
prevBackend.dispose();
|
||||||
|
@ -1885,7 +1889,6 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void startUpdate(final Runnable update) {
|
private void startUpdate(final Runnable update) {
|
||||||
final int updateCount = fUpdateCount;
|
final int updateCount = fUpdateCount;
|
||||||
|
|
Loading…
Add table
Reference in a new issue