Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authoreutarass2009-12-01 20:53:47 -0500
committereutarass2009-12-01 20:53:47 -0500
commit7532382e231a078b611ecbab9868a4822eeb5fa3 (patch)
treedf814bd8aa2388bd62f69deefd4fc9504bb2b5be /server
parent9808b068ff96fbec041cd68bdde9a7f82a1c3f1e (diff)
downloadorg.eclipse.tcf.agent-7532382e231a078b611ecbab9868a4822eeb5fa3.tar.gz
org.eclipse.tcf.agent-7532382e231a078b611ecbab9868a4822eeb5fa3.tar.xz
org.eclipse.tcf.agent-7532382e231a078b611ecbab9868a4822eeb5fa3.zip
Created TCF Server (sub)project in directory "server".
The server is value-add agent that can add source level debug capabilities for remote targets that don't have such capabilities by them self. The server code is under construction. It can be built, but does not do much yet.
Diffstat (limited to 'server')
-rw-r--r--server/Makefile30
-rw-r--r--server/about.html31
-rw-r--r--server/config.h83
-rw-r--r--server/edl-v10.html59
-rw-r--r--server/main/main.c183
-rw-r--r--server/server.sln26
-rw-r--r--server/server.vcproj283
-rw-r--r--server/services/context-proxy.c54
8 files changed, 749 insertions, 0 deletions
diff --git a/server/Makefile b/server/Makefile
new file mode 100644
index 00000000..3247086e
--- /dev/null
+++ b/server/Makefile
@@ -0,0 +1,30 @@
+TCF_AGENT_DIR=../agent
+
+include $(TCF_AGENT_DIR)/Makefile.inc
+
+CFLAGS := $(foreach dir,$(SRCDIRS),-I$(dir)) $(CFLAGS)
+HFILES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.h)) $(HFILES)
+CFILES := $(sort $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) $(CFILES))
+
+EXECS = $(BINDIR)/server$(EXTEXE)
+
+all: $(EXECS)
+
+$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
+ $(AR) -rc $@ $^
+ $(RANLIB)
+
+$(BINDIR)/server$(EXTEXE): $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
+ $(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
+
+$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
+ @mkdir -p $(dir $@)
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
+ @mkdir -p $(dir $@)
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+ rm -rf $(BINDIR)
+
diff --git a/server/about.html b/server/about.html
new file mode 100644
index 00000000..26aa2655
--- /dev/null
+++ b/server/about.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>July 28, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;), and the Eclipse Distribution License
+Version 1.0 (&quot;EDL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+A copy of the EDL is available
+at <a href="http://www.eclipse.org/org/documents/edl-v10.php">http://www.eclipse.org/org/documents/edl-v10.php</a>.
+For purposes of the EPL and the EDL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL and EDL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/server/config.h b/server/config.h
new file mode 100644
index 00000000..6bd046c6
--- /dev/null
+++ b/server/config.h
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+#ifndef D_config
+#define D_config
+
+#include "mdep.h"
+
+#if !defined(SERVICE_Locator)
+#define SERVICE_Locator 1
+#endif
+
+#if !defined(ENABLE_ZeroCopy)
+#define ENABLE_ZeroCopy 1
+#endif
+
+#if !defined(ENABLE_Splice)
+# if (ENABLE_ZeroCopy) && defined(SPLICE_F_MOVE)
+# define ENABLE_Splice 1
+# else
+# define ENABLE_Splice 0
+# endif
+#endif
+
+#if !defined(ENABLE_Trace)
+# define ENABLE_Trace 1
+#endif
+
+#if !defined(ENABLE_Discovery)
+# define ENABLE_Discovery 1
+#endif
+
+#if !defined(ENABLE_ContextProxy)
+# define ENABLE_ContextProxy 1
+#endif
+
+#if !defined(ENABLE_DebugContext)
+# define ENABLE_DebugContext 1
+#endif
+
+#if !defined(ENABLE_ELF)
+# define ENABLE_ELF 1
+#endif
+
+#if !defined(ENABLE_SSL)
+# if (TARGET_UNIX) && !defined(__APPLE__)
+# define ENABLE_SSL 1
+# else
+# define ENABLE_SSL 0
+# endif
+#endif
+
+#ifdef CONFIG_MAIN
+/*
+ * This part of config.h contains services initialization code,
+ * which is executed during agent startup.
+ */
+
+#include "discovery.h"
+#include "diagnostics.h"
+
+static void ini_services(Protocol * proto, TCFBroadcastGroup * bcg, TCFSuspendGroup * spg) {
+#if SERVICE_Locator
+ ini_locator_service(proto, bcg);
+#endif
+
+ ini_diagnostics_service(proto);
+}
+
+#endif /* CONFIG_MAIN */
+
+#endif /* D_config */
diff --git a/server/edl-v10.html b/server/edl-v10.html
new file mode 100644
index 00000000..58cf7c3f
--- /dev/null
+++ b/server/edl-v10.html
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Distribution License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<p><b>Eclipse Distribution License - v 1.0</b></p>
+
+<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p>
+
+<p>All rights reserved.</p>
+<p>Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+<ul><li>Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer. </li>
+<li>Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution. </li>
+<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission. </li></ul>
+</p>
+<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.</p>
+
+</body>
+
+</html>
diff --git a/server/main/main.c b/server/main/main.c
new file mode 100644
index 00000000..ba453890
--- /dev/null
+++ b/server/main/main.c
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * TCF Server main module.
+ *
+ * TCF Server is a value-add that provides StackTrace, Symbols, LineNumbers and Expressions services.
+ */
+
+#define CONFIG_MAIN
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <assert.h>
+#include "asyncreq.h"
+#include "events.h"
+#include "trace.h"
+#include "myalloc.h"
+#include "json.h"
+#include "channel.h"
+#include "protocol.h"
+#include "proxy.h"
+#include "discovery.h"
+#include "errors.h"
+
+static char * progname;
+static Protocol * proto;
+static ChannelServer * serv;
+static TCFBroadcastGroup * bcg;
+static TCFSuspendGroup * spg;
+
+static void channel_server_connecting(Channel * c) {
+ trace(LOG_PROTOCOL, "channel server connecting");
+
+ send_hello_message(c->client_data, c);
+ flush_stream(&c->out);
+}
+
+static void channel_server_connected(Channel * c) {
+ int i;
+
+ trace(LOG_PROTOCOL, "channel server connected, peer services:");
+ for (i = 0; i < c->peer_service_cnt; i++) {
+ trace(LOG_PROTOCOL, " %s", c->peer_service_list[i]);
+ }
+}
+
+static void channel_server_receive(Channel * c) {
+ handle_protocol_message(c->client_data, c);
+}
+
+static void channel_server_disconnected(Channel * c) {
+ trace(LOG_PROTOCOL, "channel server disconnected");
+}
+
+static void channel_new_connection(ChannelServer * serv, Channel * c) {
+ protocol_reference(proto);
+ c->client_data = proto;
+ c->connecting = channel_server_connecting;
+ c->connected = channel_server_connected;
+ c->receive = channel_server_receive;
+ c->disconnected = channel_server_disconnected;
+ channel_set_suspend_group(c, spg);
+ channel_set_broadcast_group(c, bcg);
+ channel_start(c);
+}
+
+#if defined(_WRS_KERNEL)
+int tcf_va(void) {
+#else
+int main(int argc, char ** argv) {
+#endif
+ int c;
+ int ind;
+ char * s;
+ char * log_name = 0;
+ char * url = "TCP:";
+ PeerServer * ps;
+
+ ini_mdep();
+ ini_trace();
+ ini_asyncreq();
+ ini_events_queue();
+
+#if defined(_WRS_KERNEL)
+
+ progname = "tcf";
+ open_log_file("-");
+ log_mode = 0;
+
+#else
+
+ progname = argv[0];
+
+ /* Parse arguments */
+ for (ind = 1; ind < argc; ind++) {
+ s = argv[ind];
+ if (*s != '-') {
+ break;
+ }
+ s++;
+ while ((c = *s++) != '\0') {
+ switch (c) {
+ case 'l':
+ case 'L':
+ case 's':
+ if (*s == '\0') {
+ if (++ind >= argc) {
+ fprintf(stderr, "%s: error: no argument given to option '%c'\n", progname, c);
+ exit(1);
+ }
+ s = argv[ind];
+ }
+ switch (c) {
+ case 'l':
+ log_mode = strtol(s, 0, 0);
+ break;
+
+ case 'L':
+ log_name = s;
+ break;
+
+ case 's':
+ url = s;
+ break;
+
+ default:
+ fprintf(stderr, "%s: error: illegal option '%c'\n", progname, c);
+ exit(1);
+ }
+ s = "";
+ break;
+
+ default:
+ fprintf(stderr, "%s: error: illegal option '%c'\n", progname, c);
+ exit(1);
+ }
+ }
+ }
+
+ open_log_file(log_name);
+
+#endif
+
+ bcg = broadcast_group_alloc();
+ spg = suspend_group_alloc();
+ proto = protocol_alloc();
+ ini_services(proto, bcg, spg);
+
+ ps = channel_peer_from_url(url);
+ if (ps == NULL) {
+ fprintf(stderr, "invalid server URL (-s option value): %s\n", url);
+ exit(1);
+ }
+ peer_server_addprop(ps, loc_strdup("Name"), loc_strdup("TCF Proxy"));
+ peer_server_addprop(ps, loc_strdup("Proxy"), loc_strdup(""));
+ serv = channel_server(ps);
+ if (serv == NULL) {
+ fprintf(stderr, "cannot create TCF server\n");
+ exit(1);
+ }
+ serv->new_conn = channel_new_connection;
+
+ discovery_start();
+
+ /* Process events - must run on the initial thread since ptrace()
+ * returns ECHILD otherwise, thinking we are not the owner. */
+ run_event_loop();
+ return 0;
+}
diff --git a/server/server.sln b/server/server.sln
new file mode 100644
index 00000000..29ab0681
--- /dev/null
+++ b/server/server.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{4EBA43E4-98C0-4F00-ADA7-21758F1BAE77}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agent", "..\agent\agent.vcproj", "{A1341B90-F807-4D1F-A48E-C42BE62D9C57}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4EBA43E4-98C0-4F00-ADA7-21758F1BAE77}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4EBA43E4-98C0-4F00-ADA7-21758F1BAE77}.Debug|Win32.Build.0 = Debug|Win32
+ {4EBA43E4-98C0-4F00-ADA7-21758F1BAE77}.Release|Win32.ActiveCfg = Release|Win32
+ {4EBA43E4-98C0-4F00-ADA7-21758F1BAE77}.Release|Win32.Build.0 = Release|Win32
+ {A1341B90-F807-4D1F-A48E-C42BE62D9C57}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A1341B90-F807-4D1F-A48E-C42BE62D9C57}.Debug|Win32.Build.0 = Debug|Win32
+ {A1341B90-F807-4D1F-A48E-C42BE62D9C57}.Release|Win32.ActiveCfg = Release|Win32
+ {A1341B90-F807-4D1F-A48E-C42BE62D9C57}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/server/server.vcproj b/server/server.vcproj
new file mode 100644
index 00000000..e1e76838
--- /dev/null
+++ b/server/server.vcproj
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="server"
+ ProjectGUID="{4EBA43E4-98C0-4F00-ADA7-21758F1BAE77}"
+ RootNamespace="server"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\obj\MSVC\Debug"
+ IntermediateDirectory=".\obj\MSVC\Debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,services,main,../agent/framework,../agent/services"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WS2_32.lib Iphlpapi.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\obj\MSVC\Release"
+ IntermediateDirectory=".\obj\MSVC\Release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories=".,services,main,../agent/framework,../agent/services"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WS2_32.lib Iphlpapi.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="services"
+ >
+ <File
+ RelativePath=".\services\context-proxy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\services\diagnostics.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\services\discovery.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\services\discovery_udp.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="main"
+ >
+ <File
+ RelativePath=".\main\main.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="framework"
+ >
+ <File
+ RelativePath="..\agent\framework\asyncreq.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\base64.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\channel.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\channel_tcp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\context.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\errors.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\events.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\exceptions.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\inputbuf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\ip_ifc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\json.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\mdep.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\myalloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\peer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\protocol.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\proxy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\streams.c"
+ >
+ </File>
+ <File
+ RelativePath="..\agent\framework\trace.c"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\config.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/server/services/context-proxy.c b/server/services/context-proxy.c
new file mode 100644
index 00000000..f57aea74
--- /dev/null
+++ b/server/services/context-proxy.c
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * This module forwards handling of process/thread OS contexts to remote peer.
+ */
+
+#include "config.h"
+
+#if ENABLE_DebugContext && ENABLE_ContextProxy
+
+#include <errno.h>
+#include "context.h"
+
+typedef struct ContextCache ContextCache;
+typedef struct PeerCache PeerCache;
+
+struct ContextCache {
+ Context * ctx;
+};
+
+struct PeerCache {
+ int x;
+};
+
+int context_has_state(Context * ctx) {
+ return 0;
+}
+
+int context_write_mem(Context * ctx, ContextAddress address, void * buf, size_t size) {
+ errno = EINVAL;
+ return -1;
+}
+
+int context_read_mem(Context * ctx, ContextAddress address, void * buf, size_t size) {
+ errno = EINVAL;
+ return -1;
+}
+
+void init_contexts_sys_dep(void) {
+}
+
+#endif /* ENABLE_DebugContext && ENABLE_ContextProxy */

Back to the top