diff options
author | Eugene Tarassov | 2015-05-13 20:25:22 +0000 |
---|---|---|
committer | Eugene Tarassov | 2015-05-13 20:25:22 +0000 |
commit | c4e7d4729116850e599eb37461b48f54dd2ea674 (patch) | |
tree | e731ff137373360b93f4a4fdde46328b1b290e40 /plugins | |
parent | 3f91f0e198f6dd2676883086f274414ad709c3d5 (diff) | |
download | org.eclipse.tcf-c4e7d4729116850e599eb37461b48f54dd2ea674.tar.gz org.eclipse.tcf-c4e7d4729116850e599eb37461b48f54dd2ea674.tar.xz org.eclipse.tcf-c4e7d4729116850e599eb37461b48f54dd2ea674.zip |
TCF Debugger: added added support for updating the Registers view while the context is running - if the context supports reading registers "on fly".
Diffstat (limited to 'plugins')
3 files changed, 35 insertions, 7 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java index e751712cd..f11e562ce 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -115,6 +115,11 @@ public class RunControlProxy implements IRunControl { return (String)props.get(PROP_SYMBOLS_GROUP); } + @SuppressWarnings("unchecked") + public Collection<String> getRegAccessTypes() { + return (Collection<String>)props.get(PROP_REG_ACCESS_TYPES); + } + public IToken getState(final DoneGetState done) { return new Command(channel, RunControlProxy.this, "getState", new Object[]{ getID() }) { @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java index f9bd63003..5c53acaa8 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.tcf.services; +import java.util.Collection; import java.util.Map; import org.eclipse.tcf.protocol.IService; @@ -77,7 +78,12 @@ public interface IRunControl extends IService { /** Context ID of a symbols group that contains the context. * Members of a symbols group share same symbol reader configuration settings, * like user defined memory map entries and source lookup info */ - PROP_SYMBOLS_GROUP = "SymbolsGroup"; + PROP_SYMBOLS_GROUP = "SymbolsGroup", + + /** Array of String, the access types allowed for this context + * when accessing context registers. + */ + PROP_REG_ACCESS_TYPES = "RegAccessTypes"; /** * Context resume modes. @@ -222,6 +228,13 @@ public interface IRunControl extends IService { REASON_ERROR = "Error"; + /** + * Values of "RegAccessTypes". + */ + static final String + REG_ACCESS_RD_RUNNING = "rd-running", /** Context supports reading registers while running */ + REG_ACCESS_WR_RUNNUNG = "wr-running"; /** Context supports writing registers while running */ + /* Optional parameters of context state -------------------------------- */ /** @@ -495,6 +508,12 @@ public interface IRunControl extends IService { String getSymbolsGroup(); /** + * Get the register access types allowed for this context. + * @return collection of access type names. + */ + Collection<String> getRegAccessTypes(); + + /** * Send a command to retrieve current state of a context. * @param done - command result call back object. * @return pending command handle, can be used to cancel the command. diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java index 2e6ea9601..015f69202 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java @@ -13,6 +13,7 @@ package org.eclipse.tcf.internal.debug.ui.model; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -234,10 +235,13 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchIn if (!ctx_cache.validate(done)) return null; IRunControl.RunControlContext ctx_data = ctx_cache.getData(); if (ctx_data != null && ctx_data.hasState()) { - TCFDataCache<TCFContextState> state_cache = exe.getState(); - if (!state_cache.validate(done)) return null; - TCFContextState state_data = state_cache.getData(); - if (state_data == null || !state_data.is_suspended) return true; + Collection<String> access_types = ctx_data.getRegAccessTypes(); + if (access_types == null || !access_types.contains(IRunControl.REG_ACCESS_RD_RUNNING)) { + TCFDataCache<TCFContextState> state_cache = exe.getState(); + if (!state_cache.validate(done)) return null; + TCFContextState state_data = state_cache.getData(); + if (state_data == null || !state_data.is_suspended) return true; + } } } return false; |