Multiple test files for testing
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,4 +2,3 @@
|
||||
*.d
|
||||
debugus
|
||||
test
|
||||
.debugusrc1.js
|
||||
|
||||
11
Makefile
11
Makefile
@@ -6,17 +6,14 @@ SRCS=debugus.c linenoise.c hash.c pmparser.c
|
||||
OBJS=$(patsubst %.c,%.o,$(SRCS))
|
||||
DEPS=$(patsubst %.c,%.d,$(SRCS))
|
||||
|
||||
all: debugus .debugusrc1.js test
|
||||
all: debugus test
|
||||
|
||||
test: test.o
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
test: test.o test2.o
|
||||
$(CC) -o $@ $^
|
||||
|
||||
debugus: $(OBJS) ./mujs/build/debug/libmujs.o ./libelfin_wrap.o
|
||||
$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
.debugusrc1.js: test .debugusrc1.js.txt
|
||||
cat .debugusrc1.js.txt | sed "s/@DUPA_ADDR/0x$$(nm ./test | grep 'dupa' | awk '{ print $$1 }')/g" > .debugusrc1.js
|
||||
|
||||
./mujs/build/debug/libmujs.o:
|
||||
make -C mujs -j$(shell nproc)
|
||||
|
||||
@@ -25,7 +22,7 @@ debugus: $(OBJS) ./mujs/build/debug/libmujs.o ./libelfin_wrap.o
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
clean: $(OBJS) test.o $(DEPS) .debugusrc1.js
|
||||
clean: $(OBJS) test.o test2.o $(DEPS)
|
||||
rm -f $^
|
||||
make -C mujs clean
|
||||
|
||||
|
||||
4
test.c
4
test.c
@@ -2,6 +2,8 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern void dupa2(void);
|
||||
|
||||
void dupa(void) {
|
||||
printf("a\n");
|
||||
printf("b\n");
|
||||
@@ -19,6 +21,8 @@ int main(void)
|
||||
}
|
||||
}
|
||||
|
||||
dupa2();
|
||||
|
||||
int *a = NULL;
|
||||
*a = 6969;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user