Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-05-16 21:57:30 -0400
committerEugene Tarassov2014-05-16 21:57:30 -0400
commit14a2df6181e47d6773a479a7bda11f35c58f68a9 (patch)
treeb9c130831a49030e3644f1d8bcaf703683410b24
parent84240d1df6854ba7eb4990cc960255884b6b525a (diff)
downloadorg.eclipse.tcf-14a2df6181e47d6773a479a7bda11f35c58f68a9.tar.gz
org.eclipse.tcf-14a2df6181e47d6773a479a7bda11f35c58f68a9.tar.xz
org.eclipse.tcf-14a2df6181e47d6773a479a7bda11f35c58f68a9.zip
TCF Core: new peer attribute: NeedSyms. If present, indicates that the peer should be used together with TCF symbols server.
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java3
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java14
2 files changed, 15 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java
index b8d50ed45..42e12f75b 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java
@@ -59,6 +59,9 @@ public interface IPeer {
/** If present, indicates that the peer can forward traffic to other peers */
ATTR_PROXY = "Proxy",
+ /** If present, indicates that the peer should be used together with TCF symbols server */
+ ATTR_NEED_SYMBOLS = "NeedSyms",
+
/** Host DNS name or IP address */
ATTR_IP_HOST = "Host",
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
index f1f7bff0f..5446a7f95 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
@@ -33,6 +33,7 @@ import org.eclipse.tcf.internal.debug.Activator;
import org.eclipse.tcf.internal.debug.model.ITCFConstants;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
import org.eclipse.tcf.internal.debug.model.TCFMemoryRegion;
+import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.JSON;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.services.IMemoryMap;
@@ -363,14 +364,23 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate {
String id = configuration.getAttribute(ATTR_USE_LOCAL_AGENT, true) ?
local_id : configuration.getAttribute(ATTR_PEER_ID, "");
- if (configuration.getAttribute(ATTR_RUN_LOCAL_SERVER, false)) {
+ boolean run_server = configuration.getAttribute(TCFLaunchDelegate.ATTR_RUN_LOCAL_SERVER, false);
+ if (!run_server && id.indexOf('/') < 0) {
+ final String agent_id = id;
+ run_server = new TCFTask<Boolean>() {
+ public void run() {
+ IPeer peer = Protocol.getLocator().getPeers().get(agent_id);
+ done(peer != null && peer.getAttributes().get(IPeer.ATTR_NEED_SYMBOLS) != null);
+ }
+ }.getE();
+ }
+ if (run_server) {
if (monitor != null) monitor.subTask("Starting TCF Server"); //$NON-NLS-1$
String server_id = TCFLocalAgent.runLocalAgent(TCFLocalAgent.SERVER_NAME);
id = server_id + "/" + id;
}
final String agent_id = id;
-
new TCFTask<Boolean>() {
public void run() {
((TCFLaunch)launch).launchTCF(mode, agent_id, this, monitor);

Back to the top