Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2010-04-20 18:31:42 +0000
committerKen Ryall2010-04-20 18:31:42 +0000
commite54fe20d889b85a4061eeb0ec1a7c8016f761b0a (patch)
treec0c2b91505e74203fc9ed8a346a5cd79ae1cb582 /dsf/org.eclipse.cdt.dsf.ui
parent24b7daf941ddacf314c24c5fad7f7660f5b4db2a (diff)
downloadorg.eclipse.cdt-e54fe20d889b85a4061eeb0ec1a7c8016f761b0a.tar.gz
org.eclipse.cdt-e54fe20d889b85a4061eeb0ec1a7c8016f761b0a.tar.xz
org.eclipse.cdt-e54fe20d889b85a4061eeb0ec1a7c8016f761b0a.zip
Display source for stack frames, not just IDMVMContext.
Diffstat (limited to 'dsf/org.eclipse.cdt.dsf.ui')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
index ff65bcd9940..062f8937edc 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
@@ -32,9 +32,9 @@ import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl;
-import org.eclipse.cdt.dsf.debug.service.IStack;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
+import org.eclipse.cdt.dsf.debug.service.IStack;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
import org.eclipse.cdt.dsf.debug.sourcelookup.DsfSourceLookupParticipant;
@@ -647,16 +647,22 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
/* (non-Javadoc)
* @see org.eclipse.debug.ui.contexts.ISourceDisplayAdapter#displaySource(java.lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)
*/
- public void displaySource(Object context, final IWorkbenchPage page, final boolean force) {
+ public void displaySource(Object context, final IWorkbenchPage page,
+ final boolean force) {
fStepCount = 0;
- if (!(context instanceof IDMVMContext)) return;
- final IDMContext dmc = ((IDMVMContext)context).getDMContext();
-
- // Quick test. DMC is checked again in source lookup participant, but
- // it's much quicker to test here.
- if (!(dmc instanceof IFrameDMContext)) return;
- doDisplaySource((IFrameDMContext) dmc, page, force, false);
+ IFrameDMContext displayFrame = null;
+ if (context instanceof IDMVMContext) {
+ IDMContext dmc = ((IDMVMContext) context).getDMContext();
+ if (dmc instanceof IFrameDMContext)
+ displayFrame = (IFrameDMContext) dmc;
+ } else if (context instanceof IFrameDMContext)
+ displayFrame = (IFrameDMContext) context;
+
+ // Quick test. DMC is checked again in source lookup participant, but
+ // it's much quicker to test here.
+ if (displayFrame != null)
+ doDisplaySource(displayFrame, page, force, false);
}
private void doDisplaySource(final IFrameDMContext context, final IWorkbenchPage page, final boolean force, final boolean eventTriggered) {

Back to the top