From 98c46f70f7060a91612c0af4e1461bc6cdbcb448 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Mon, 2 May 2016 14:51:12 +0200 Subject: [PATCH] add a very basic tracee to ease debugging of the tracer --- common/utils/T/tracee/Makefile | 14 ++++++++++++++ common/utils/T/tracee/README | 1 + common/utils/T/tracee/tracee.c | 16 ++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 common/utils/T/tracee/Makefile create mode 100644 common/utils/T/tracee/README create mode 100644 common/utils/T/tracee/tracee.c diff --git a/common/utils/T/tracee/Makefile b/common/utils/T/tracee/Makefile new file mode 100644 index 0000000000..bc7c01d86b --- /dev/null +++ b/common/utils/T/tracee/Makefile @@ -0,0 +1,14 @@ +CC=gcc +CFLAGS=-Wall -g -pthread -DT_TRACER -DT_USE_SHARED_MEMORY -I. + +PROG=tracee +OBJS=tracee.o ../T.o + +$(PROG): $(OBJS) + $(CC) $(CFLAGS) -o $(PROG) $(OBJS) -lrt + +tracee.o: tracee.c + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + rm -f *.o $(PROG) core diff --git a/common/utils/T/tracee/README b/common/utils/T/tracee/README new file mode 100644 index 0000000000..f18dda85ac --- /dev/null +++ b/common/utils/T/tracee/README @@ -0,0 +1 @@ +this is a very basic tracee, used to debug the tracer diff --git a/common/utils/T/tracee/tracee.c b/common/utils/T/tracee/tracee.c new file mode 100644 index 0000000000..86cf3012aa --- /dev/null +++ b/common/utils/T/tracee/tracee.c @@ -0,0 +1,16 @@ +#include "../T.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int main(void) +{ + int frame = 0; + T_connect_to_tracer("127.0.0.1", 2020); + while (1) { + getchar(); + T(T_PUCCH_1AB_IQ, T_INT(0), T_INT(0), T_INT(frame), T_INT(0), T_INT(0), T_INT(0)); + frame++; + } + return 0; +} -- GitLab