Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMircea Gherzan2019-10-29 19:00:33 -0400
committerMircea Gherzan2019-10-29 19:00:33 -0400
commit6308f5a69a741cb2266cf701c6fd333cd6a27ae1 (patch)
tree14d22c54ae9a5f6e5082bfb23d8a090fd43a1ae0
parent4434a6d830bce7e21522eb3b06f9147e18f53f05 (diff)
downloadorg.eclipse.tcf.agent-6308f5a69a741cb2266cf701c6fd333cd6a27ae1.tar.gz
org.eclipse.tcf.agent-6308f5a69a741cb2266cf701c6fd333cd6a27ae1.tar.xz
org.eclipse.tcf.agent-6308f5a69a741cb2266cf701c6fd333cd6a27ae1.zip
TCF Server: allow overriding of remote services
In some cases we might need to override the services provided by the target agent (i.e. use the proxy-provided services instead). Change-Id: I4e99ec07252a46e4de1eb97f7d9f5850e0d76d02 Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
-rw-r--r--server/tcf/config.h4
-rw-r--r--server/tcf/main/server.c13
2 files changed, 12 insertions, 5 deletions
diff --git a/server/tcf/config.h b/server/tcf/config.h
index 317e0a01..8612a5dc 100644
--- a/server/tcf/config.h
+++ b/server/tcf/config.h
@@ -151,6 +151,10 @@
#define ENABLE_ContextExtraProperties 0
#endif
+#if !defined(ENABLE_ServiceOverride)
+#define ENABLE_ServiceOverride 0
+#endif
+
#define ENABLE_RCBP_TEST 0
#define ENABLE_ContextMemoryProperties 0
diff --git a/server/tcf/main/server.c b/server/tcf/main/server.c
index cf19c903..d037e7c2 100644
--- a/server/tcf/main/server.c
+++ b/server/tcf/main/server.c
@@ -111,17 +111,13 @@ static void channel_redirection_listener(Channel * host, Channel * target) {
* services below are defined (note that nm may be used
* in TARGET_SERVICE_CHECK_HOOK() macro). */
(void)nm;
+#if !ENABLE_ServiceOverride
#if SERVICE_LineNumbers
if (strcmp(nm, "LineNumbers") == 0) service_ln = 1;
#endif
#if SERVICE_Symbols
if (strcmp(nm, "Symbols") == 0) service_sm = 1;
#endif
-#if SERVICE_PathMap
-# if ENABLE_DebugContext && ENABLE_ContextProxy
- if (strcmp(nm, "PathMap") == 0) service_pm = 1;
-# endif
-#endif
#if SERVICE_Disassembly
if (strcmp(nm, "Disassembly") == 0) service_da = 1;
#endif
@@ -131,6 +127,13 @@ static void channel_redirection_listener(Channel * host, Channel * target) {
#if SERVICE_MemoryMap
if (strcmp(nm, "MemoryMap") == 0) service_mm = 1;
#endif
+#endif /* ENABLE_ServiceOverride */
+
+#if SERVICE_PathMap
+# if ENABLE_DebugContext && ENABLE_ContextProxy
+ if (strcmp(nm, "PathMap") == 0) service_pm = 1;
+# endif
+#endif
TARGET_SERVICE_CHECK_HOOK;
}
#if SERVICE_PathMap

Back to the top