From 434c29ab17cc6c017a6965352a946e1952ed1d2f Mon Sep 17 00:00:00 2001 From: Pawel Piech Date: Thu, 7 Jun 2007 23:17:06 +0000 Subject: [PATCH] Applied patch implementing tracking of selected stack frame (bug 159696). --- .../eclipse/dd/dsf/debug/service/command/ICommand.java | 9 +++++++++ .../src/org/eclipse/dd/dsf/datamodel/DMContexts.java | 3 +++ 2 files changed, 12 insertions(+) diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/ICommand.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/ICommand.java index 1e6a2520705..8c8a53c4b48 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/ICommand.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/ICommand.java @@ -7,10 +7,13 @@ * * Contributors: * Wind River Systems - initial API and implementation + * Ericsson - Modified for additional features in DSF Reference implementation *******************************************************************************/ package org.eclipse.dd.dsf.debug.service.command; +import org.eclipse.dd.dsf.datamodel.IDMContext; + /** * Command interface for creating and manipulating GDB/MI commands @@ -31,6 +34,12 @@ public interface ICommand { * @return newly created command, or null if command cannot be coalesced */ public ICommand coalesceWith( ICommand command ); + + /** + * Returns the context that this command is to be evaluated in. May be null + * if the command does not need to be evaluated in a specific context. + */ + public IDMContext getContext(); } diff --git a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/datamodel/DMContexts.java b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/datamodel/DMContexts.java index 6b7e0bd0e71..d0877827bf3 100644 --- a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/datamodel/DMContexts.java +++ b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/datamodel/DMContexts.java @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * Ericsson - Modified for additional features in DSF Reference implementation *******************************************************************************/ package org.eclipse.dd.dsf.datamodel; @@ -31,6 +32,8 @@ public class DMContexts { @ThreadSafe @SuppressWarnings("unchecked") public static V getAncestorOfType(IDMContext ctx, Class ancestorType) { + if(ctx == null) + return null; if (ancestorType.isAssignableFrom(ctx.getClass())) { return (V)ctx; }