diff options
author | eutarass | 2008-09-22 18:28:12 +0000 |
---|---|---|
committer | eutarass | 2008-09-22 18:28:12 +0000 |
commit | a3e68f01b6d211fc5832e695037a562a7a65af2d (patch) | |
tree | 8ce854545c847075c20b5e1373b768bf617337c1 | |
parent | 6b640dd701f8793fb43f2cdd4f8721c0342af80e (diff) | |
download | org.eclipse.tcf-a3e68f01b6d211fc5832e695037a562a7a65af2d.tar.gz org.eclipse.tcf-a3e68f01b6d211fc5832e695037a562a7a65af2d.tar.xz org.eclipse.tcf-a3e68f01b6d211fc5832e695037a562a7a65af2d.zip |
Better support for TCF Agent portability:
1. Changed TCF Agent Makefile to use different output directories for different build targets.
2. Agent binary files are now created in "<OS name>/<CPU name>/<Debug|Release>" directories.
3. Changed agent CDT project file to include multiple build configurations: Cygwin Debug, Cygwin Release, Msys Debug, etc.
4 files changed, 42 insertions, 24 deletions
diff --git a/docs/TCF Getting Started.html b/docs/TCF Getting Started.html index 02a6afc55..2a7f01865 100644 --- a/docs/TCF Getting Started.html +++ b/docs/TCF Getting Started.html @@ -122,11 +122,14 @@ below are steps to create and populate Eclipse workspace with TCF projects:</p> <h2><a name='Agent'>Building TCF Agent</a></h2> +<p><b>CDT</b> can be used to build TCF agent. +CDT .project file is located in <code><TCF Root>/agent</code> directory. + <p><b>Linux</b> is the recommended evaluation platform, since most TCF services are implemented. To build the agent: <ul> <li>Run <code>make</code> command in <code><TCF Root>/agent</code> directory. - <li>Start agent with <code>./agent -L- -l0</code> command. + <li>Start agent: <pre>GNU/Linux/i686/Debug/agent -L- -l0</pre> Use other -l option values to increase agent log details level. </ul> @@ -135,10 +138,11 @@ For building the agent, there are two possibilities:<ul> <li>Building with gcc (freely available from <a href="http://wascana.sourceforge.net/">Wascana</a>, <a href="http://www.cygwin.com">Cygwin</a> or the <a href="http://www.mingw.org/">MinGW32 project</a>): run -<pre>make -fMakefile_cygwin.mak</pre> -in the agent directory (the Makefile works with mingw, too).</li> +<pre>make</pre> or <pre>make SYSOP=Msys</pre> +in the agent directory.</li> -<li>Building with Microsoft Visual C++: Open workspace file <code><TCF Root>/agent/agent.dsw</code> +<li>Building with Microsoft Visual C++: +open workspace file <code><TCF Root>/agent/agent.sln</code> and then build and run the agent using Development Studio commands. If getting an error about <tt>IPHlpApi.h</tt> missing, you'll need to install the latest <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en">MS Platform SDK</a>. diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile index 6e4e99dd7..188feb701 100644 --- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile +++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile @@ -1,35 +1,49 @@ -CC=gcc -CFLAGS=-g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -Wmissing-prototypes -I. -I../../agent -I- +CONF=Debug -CFILES=$(basename $(wildcard *.c)) $(basename $(notdir $(wildcard ../../agent/*.c))) -OFILES=$(filter-out main%.o, $(addsuffix .o, $(CFILES))) -HFILES=$(wildcard *.h) $(wildcard ../../agent/*.h) Makefile - -EXES=agent - -UNAME=$(shell uname -o) +CC=gcc +ifeq ($(CONF),Debug) +CFLAGS=-g +else +CFLAGS=-O +endif +CFLAGS:=$(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -Wmissing-prototypes -I. -I../../agent -I- -ifeq ($(UNAME),Cygwin) +OPSYS=$(shell uname -o) +MACHINE=$(shell uname -m) +ifeq ($(OPSYS),Cygwin) LIBS=-lws2_32 -liphlpapi else -ifeq ($(UNAME),Msys) +ifeq ($(OPSYS),Msys) CFLAGS:=-mwin32 $(CFLAGS) LIBS=-lws2_32 -liphlpapi else -LIBS=-lpthread -lrt -lelf +LIBS=-lpthread -lrt endif endif -all: $(EXES) +BINDIR=$(OPSYS)/$(MACHINE)/$(CONF) + +CFILES=$(basename $(wildcard *.c)) $(basename $(notdir $(wildcard ../../agent/*.c))) +OFILES=$(addprefix $(BINDIR)/,$(filter-out main%.o, $(addsuffix .o, $(CFILES)))) +HFILES=$(wildcard *.h) $(wildcard ../../agent/*.h) Makefile + +EXECS=$(BINDIR)/agent + +all: $(EXECS) + +$(BINDIR)/libtcf.a : $(OFILES) + ar -rc $@ $(OFILES) -agent: main.o $(OFILES) - $(CC) $(CFLAGS) -o $@ main.o $(OFILES) $(LIBS) +$(BINDIR)/agent: $(BINDIR)/main.o $(BINDIR)/libtcf.a + $(CC) $(CFLAGS) -o $@ $(BINDIR)/main.o $(BINDIR)/libtcf.a $(LIBS) -%.o: %.c $(HFILES) +$(BINDIR)/%.o: %.c $(HFILES) $(BINDIR) + @mkdir -p $(BINDIR) $(CC) $(CFLAGS) -c -o $@ $< -%.o: ../../agent/%.c $(HFILES) +$(BINDIR)/%.o: ../../agent/%.c $(HFILES) + @mkdir -p $(BINDIR) $(CC) $(CFLAGS) -c -o $@ $< clean: - rm -f *.o $(EXES) + rm -rf $(BINDIR) diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFBreakpointAdapterFactory.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFBreakpointAdapterFactory.java index 8bd8e49e9..f0dd7bb93 100644 --- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFBreakpointAdapterFactory.java +++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFBreakpointAdapterFactory.java @@ -24,7 +24,6 @@ public class TCFBreakpointAdapterFactory implements IAdapterFactory { if (obj instanceof TCFNode) { return new BreakpointCommand(); } - System.out.println(obj.getClass().getName() + " -> " + adapterType); return null; } diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/IErrorReport.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/IErrorReport.java index f7211c72f..66349fef6 100644 --- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/IErrorReport.java +++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/IErrorReport.java @@ -73,5 +73,6 @@ public interface IErrorReport { TCF_ERROR_INV_NUMBER = 20, TCF_ERROR_INV_DWARF = 21, TCF_ERROR_SYM_NOT_FOUND = 22, - TCF_ERROR_UNSUPPORTED = 23; + TCF_ERROR_UNSUPPORTED = 23, + TCF_ERROR_INV_DATA_TYPE = 24; } |