From a3e68f01b6d211fc5832e695037a562a7a65af2d Mon Sep 17 00:00:00 2001 From: eutarass Date: Mon, 22 Sep 2008 18:28:12 +0000 Subject: 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 "//" directories. 3. Changed agent CDT project file to include multiple build configurations: Cygwin Debug, Cygwin Release, Msys Debug, etc. --- docs/TCF Getting Started.html | 12 ++++-- .../Makefile | 50 ++++++++++++++-------- .../ui/adapters/TCFBreakpointAdapterFactory.java | 1 - .../org/eclipse/tm/tcf/protocol/IErrorReport.java | 3 +- 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:

Building TCF Agent

+

CDT can be used to build TCF agent. +CDT .project file is located in <TCF Root>/agent directory. +

Linux is the recommended evaluation platform, since most TCF services are implemented. To build the agent:

  • Run make command in <TCF Root>/agent directory. -
  • Start agent with ./agent -L- -l0 command. +
  • Start agent:
    GNU/Linux/i686/Debug/agent -L- -l0
    Use other -l option values to increase agent log details level.
@@ -135,10 +138,11 @@ For building the agent, there are two possibilities:
  • Building with gcc (freely available from Wascana, Cygwin or the MinGW32 project): run -
    make -fMakefile_cygwin.mak
    -in the agent directory (the Makefile works with mingw, too).
  • +
    make
    or
    make SYSOP=Msys
    +in the agent directory. -
  • Building with Microsoft Visual C++: Open workspace file <TCF Root>/agent/agent.dsw +
  • Building with Microsoft Visual C++: +open workspace file <TCF Root>/agent/agent.sln and then build and run the agent using Development Studio commands. If getting an error about IPHlpApi.h missing, you'll need to install the latest MS Platform SDK. 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; } -- cgit v1.2.3