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 "
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:
make
command in <TCF Root>/agent
directory.
- ./agent -L- -l0
command.
+ GNU/Linux/i686/Debug/agent -L- -l0Use other -l option values to increase agent log details level.
make -fMakefile_cygwin.mak-in the agent directory (the Makefile works with mingw, too).
makeor
make SYSOP=Msys+in the agent directory. -
<TCF Root>/agent/agent.dsw
+<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