Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.application.tests/projects/hello')
-rw-r--r--debug/org.eclipse.cdt.debug.application.tests/projects/hello/Makefile15
-rw-r--r--debug/org.eclipse.cdt.debug.application.tests/projects/hello/hello.c13
-rw-r--r--debug/org.eclipse.cdt.debug.application.tests/projects/hello/somehdr.h9
-rw-r--r--debug/org.eclipse.cdt.debug.application.tests/projects/hello/x.c3
4 files changed, 40 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.application.tests/projects/hello/Makefile b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/Makefile
new file mode 100644
index 00000000000..942ade9b2da
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/Makefile
@@ -0,0 +1,15 @@
+all: a.out
+
+CFLAGS=-I. -g3 -O2 -Djeff=2
+
+a.out: hello.o x.o
+ gcc -g -o a.out $?
+
+hello.o: hello.c somehdr.h
+ gcc -c $(CFLAGS) hello.c
+
+x.o: x.c
+ gcc -c $(CFLAGS) $<
+
+clean:
+ rm *.o *.out
diff --git a/debug/org.eclipse.cdt.debug.application.tests/projects/hello/hello.c b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/hello.c
new file mode 100644
index 00000000000..1579168aca0
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/hello.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include "somehdr.h"
+
+int main(int argc, char **argv) {
+ int k = SOME_VALUE; /* comment */
+ int j = x(k);
+ int i;
+ for (i = 0; i < argc; ++i) {
+ printf("argv %d is %s\n", i, argv[i]);
+ }
+ printf ("hello world %d\n", j);
+ return 0;
+}
diff --git a/debug/org.eclipse.cdt.debug.application.tests/projects/hello/somehdr.h b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/somehdr.h
new file mode 100644
index 00000000000..511fd8418f6
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/somehdr.h
@@ -0,0 +1,9 @@
+#ifndef _SOMEHDR_H
+#define _SOMEHDR_H
+#ifdef jeff
+#define SOME_VALUE 6
+#else
+#define SOME_VALUE 8
+#endif
+extern int x(int);
+#endif
diff --git a/debug/org.eclipse.cdt.debug.application.tests/projects/hello/x.c b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/x.c
new file mode 100644
index 00000000000..d3776e46aaa
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.application.tests/projects/hello/x.c
@@ -0,0 +1,3 @@
+int x(int y) {
+ return y * 7;
+}

Back to the top