Skip to content

Commit 6d582b3

Browse files
committed
Add Makefiles enabeling memory-analyzer and tests
1 parent 6f146a6 commit 6d582b3

File tree

8 files changed

+72
-1
lines changed

8 files changed

+72
-1
lines changed

regression/memory-analyzer/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
default: clean tests.log
2+
3+
clean:
4+
find -name '*.exe' -execdir $(RM) '{}' \;
5+
find -name '*.out' -execdir $(RM) '{}' \;
6+
$(RM) tests.log
7+
8+
test:
9+
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
10+
@../test.pl -p -c ../compile_example.sh
11+
12+
tests.log: ../test.pl
13+
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
14+
@../test.pl -p -c ../compile_example.sh
15+
16+
show:
17+
@for dir in *; do \
18+
if [ -d "$$dir" ]; then \
19+
vim -o "$$dir/*.c" "$$dir/*.out"; \
20+
fi; \
21+
done;

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ add_subdirectory(jsil)
9191
add_subdirectory(json)
9292
add_subdirectory(langapi)
9393
add_subdirectory(linking)
94+
add_subdirectory(memory-analyzer)
9495
add_subdirectory(memory-models)
9596
add_subdirectory(pointer-analysis)
9697
add_subdirectory(solvers)

src/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ DIRS = analyses \
1515
json \
1616
langapi \
1717
linking \
18+
memory-analyzer \
1819
memory-models \
1920
pointer-analysis \
2021
solvers \
@@ -27,6 +28,7 @@ all: cbmc.dir \
2728
goto-cc.dir \
2829
goto-diff.dir \
2930
goto-instrument.dir \
31+
memory-analyzer.dir \
3032
# Empty last line
3133

3234
###############################################################################
@@ -64,6 +66,8 @@ goto-diff.dir: languages goto-programs.dir pointer-analysis.dir \
6466

6567
goto-cc.dir: languages pointer-analysis.dir goto-programs.dir linking.dir
6668

69+
memory-analyzer.dir: util.dir goto-programs.dir
70+
6771
# building for a particular directory
6872

6973
$(patsubst %, %.dir, $(DIRS)):

src/memory-analyzer/Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
SRC = analyze_symbol.cpp\
2+
gdb_api.cpp \
3+
memory_analyzer_main.cpp \
4+
memory_analyzer_parse_options.cpp
5+
# Empty last line
6+
7+
INCLUDES= -I ..
8+
9+
LIBS = \
10+
../ansi-c/ansi-c.a \
11+
../goto-programs/goto-programs.a \
12+
../linking/linking.a \
13+
../util/util.a \
14+
../big-int/big-int.a \
15+
../langapi/langapi.a
16+
17+
18+
19+
CLEANFILES = memory-analyzer$(EXEEXT)
20+
21+
include ../config.inc
22+
include ../common
23+
24+
all: memory-analyzer$(EXEEXT)
25+
26+
27+
28+
###############################################################################
29+
30+
memory-analyzer$(EXEEXT): $(OBJ)
31+
$(LINKBIN)
32+
33+
34+
.PHONY: memory-analyser-mac-signed
35+
36+
memory-analyser-mac-signed: memory-analyzer$(EXEEXT)
37+
codesign -v -s $(OSX_IDENTITY) memory-analyzer$(EXEEXT)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ansi-c
2+
goto-programs
3+
util

unit/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SRC += unit_tests.cpp \
1717
analyses/does_remove_const/is_type_at_least_as_const_as.cpp \
1818
goto-programs/goto_trace_output.cpp \
1919
path_strategies.cpp \
20+
memory-analyzer/gdb_api.cpp \
2021
solvers/floatbv/float_utils.cpp \
2122
solvers/refinement/array_pool/array_pool.cpp \
2223
solvers/refinement/string_constraint_generator_valueof/calculate_max_string_length.cpp \
@@ -97,7 +98,8 @@ TESTS = unit_tests$(EXEEXT) \
9798
miniBDD$(EXEEXT) \
9899
# Empty last line
99100

100-
CLEANFILES = $(TESTS)
101+
CLEANFILES = $(TESTS)\
102+
#Empty last line
101103

102104
all: cprover.dir testing-utils.dir
103105
$(MAKE) $(MAKEARGS) $(TESTS)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
memory-analyzer
2+
testing-utils

unit/module_dependencies.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ goto-programs
55
goto-symex
66
json
77
langapi # should go away
8+
memory-analyzer
89
solvers/flattening
910
solvers/floatbv
1011
solvers/miniBDD

0 commit comments

Comments
 (0)