Skip to content

Commit 0b714fa

Browse files
committed
updated to the latest bap
1. build system now properly builds and installs plugin oasis setup ./configure --prefix `opam config var prefix` make make install 2. cleaned the repository from autogenerated files 3. switched to ppx 4. fixed plugin - now it registers itself.
1 parent cb6fd64 commit 0b714fa

15 files changed

+101
-7634
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@
2222
/setup.log
2323
/setup.ml
2424
META
25+
/META
26+
/frames.ml
27+
/myocamlbuild.ml
28+
/setup.ml

META

Lines changed: 0 additions & 22 deletions
This file was deleted.

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# OASIS_START
2-
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)
3-
41
SETUP = ocaml setup.ml
52

63
build: setup.data
@@ -12,17 +9,21 @@ doc: setup.data build
129
test: setup.data build
1310
$(SETUP) -test $(TESTFLAGS)
1411

15-
all:
16-
$(SETUP) -all $(ALLFLAGS)
12+
all: build install
1713

1814
install: setup.data
1915
$(SETUP) -install $(INSTALLFLAGS)
16+
make plugin
2017

2118
uninstall: setup.data
2219
$(SETUP) -uninstall $(UNINSTALLFLAGS)
2320

24-
reinstall: setup.data
25-
$(SETUP) -reinstall $(REINSTALLFLAGS)
21+
plugin:
22+
make -C plugin
23+
24+
reinstall:
25+
make uninstall;
26+
make install
2627

2728
clean:
2829
$(SETUP) -clean $(CLEANFLAGS)
@@ -36,9 +37,8 @@ setup.data:
3637
configure:
3738
$(SETUP) -configure $(CONFIGUREFLAGS)
3839

39-
.PHONY: build doc test all install uninstall reinstall clean distclean configure
40+
.PHONY: build doc test all install uninstall reinstall clean distclean configure plugin
4041

41-
# OASIS_STOP
4242
PIQI=piqi
4343
OCI=ocp-indent
4444

_oasis

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
OASISFormat: 0.4
2-
Name: bap-traces
2+
Name: bap-frames
33
Version: 0.1
4-
Synopsis: BAP Trace Format
5-
Authors: Matthew Maurer
6-
License: BSD-3-clause
7-
Plugins: META (0.4), DevFiles (0.4)
4+
Synopsis: data format for execution traces
5+
Authors: BAP Team
6+
License: MIT
7+
Plugins: META (0.4)
8+
BuildTools: ocamlbuild, bapbuild
89

9-
Library "bap-traces"
10+
Library "bap-frames"
1011
Path: .
11-
BuildTools: ocamlbuild
12-
Modules: Trace_container, Frame_piqi, Frame_piqi_ext
13-
InternalModules: Arch_bfd
14-
BuildDepends: core_kernel, piqirun.pb, piqirun.ext, piqilib, sexplib.syntax
12+
Modules: Trace_container, Frame_piqi, Frame_piqi_ext, Arch_bfd
13+
BuildDepends: core_kernel, piqirun.pb, piqirun.ext, piqilib, ppx_jane
1514
DataFiles: *.piqi
1615

17-
Library "bap-traces-plugin"
16+
Library "bap-plugin-frames"
1817
Path: plugin
19-
BuildTools: ocamlbuild
20-
FindlibName: plugin
21-
FindlibParent: bap-traces
18+
FindlibName: bap-plugin-frames
2219
Modules: Frame_trace_plugin
2320
InternalModules: Frame_events
24-
BuildDepends: bap, bap-traces
21+
BuildDepends: bap, bap-frames, bap-traces
22+
XMETADescription: read traces in frames format
2523

2624
Executable tracedump
2725
Path: test
2826
MainIs: tracedump.ml
29-
BuildTools: ocamlbuild
3027
CompiledObject: best
3128
Install: false
32-
BuildDepends: bap, bap-traces, bap-traces.plugin, cmdliner
33-
34-
35-
29+
BuildDepends: bap, bap-frames, bap-plugin-frames, cmdliner

_tags

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: 18319d993797e2bd34bf113e924cf4e3)
2+
# DO NOT EDIT (digest: 20d045e1058268e74375bb77116b7fd0)
33
# Ignore VCS directories, you can use the same kind of rule outside
44
# OASIS_START/STOP if you want to exclude directories that contains
55
# useless stuff for the build process
@@ -14,39 +14,42 @@ true: annot, bin_annot
1414
".git": not_hygienic
1515
"_darcs": -traverse
1616
"_darcs": not_hygienic
17-
# Library bap-traces
18-
"bap-traces.cmxs": use_bap-traces
17+
# Library bap-frames
18+
"bap-frames.cmxs": use_bap-frames
1919
<*.ml{,i,y}>: pkg_core_kernel
2020
<*.ml{,i,y}>: pkg_piqilib
2121
<*.ml{,i,y}>: pkg_piqirun.ext
2222
<*.ml{,i,y}>: pkg_piqirun.pb
23-
<*.ml{,i,y}>: pkg_sexplib.syntax
24-
# Library bap-traces-plugin
25-
"plugin/bap-traces-plugin.cmxs": use_bap-traces-plugin
23+
<*.ml{,i,y}>: pkg_ppx_jane
24+
# Library bap-plugin-frames
25+
"plugin/bap-plugin-frames.cmxs": use_bap-plugin-frames
2626
<plugin/*.ml{,i,y}>: pkg_bap
27+
<plugin/*.ml{,i,y}>: pkg_bap-traces
2728
<plugin/*.ml{,i,y}>: pkg_core_kernel
2829
<plugin/*.ml{,i,y}>: pkg_piqilib
2930
<plugin/*.ml{,i,y}>: pkg_piqirun.ext
3031
<plugin/*.ml{,i,y}>: pkg_piqirun.pb
31-
<plugin/*.ml{,i,y}>: pkg_sexplib.syntax
32-
<plugin/*.ml{,i,y}>: use_bap-traces
32+
<plugin/*.ml{,i,y}>: pkg_ppx_jane
33+
<plugin/*.ml{,i,y}>: use_bap-frames
3334
# Executable tracedump
3435
<test/tracedump.{native,byte}>: pkg_bap
36+
<test/tracedump.{native,byte}>: pkg_bap-traces
3537
<test/tracedump.{native,byte}>: pkg_cmdliner
3638
<test/tracedump.{native,byte}>: pkg_core_kernel
3739
<test/tracedump.{native,byte}>: pkg_piqilib
3840
<test/tracedump.{native,byte}>: pkg_piqirun.ext
3941
<test/tracedump.{native,byte}>: pkg_piqirun.pb
40-
<test/tracedump.{native,byte}>: pkg_sexplib.syntax
41-
<test/tracedump.{native,byte}>: use_bap-traces
42-
<test/tracedump.{native,byte}>: use_bap-traces-plugin
42+
<test/tracedump.{native,byte}>: pkg_ppx_jane
43+
<test/tracedump.{native,byte}>: use_bap-frames
44+
<test/tracedump.{native,byte}>: use_bap-plugin-frames
4345
<test/*.ml{,i,y}>: pkg_bap
46+
<test/*.ml{,i,y}>: pkg_bap-traces
4447
<test/*.ml{,i,y}>: pkg_cmdliner
4548
<test/*.ml{,i,y}>: pkg_core_kernel
4649
<test/*.ml{,i,y}>: pkg_piqilib
4750
<test/*.ml{,i,y}>: pkg_piqirun.ext
4851
<test/*.ml{,i,y}>: pkg_piqirun.pb
49-
<test/*.ml{,i,y}>: pkg_sexplib.syntax
50-
<test/*.ml{,i,y}>: use_bap-traces
51-
<test/*.ml{,i,y}>: use_bap-traces-plugin
52+
<test/*.ml{,i,y}>: pkg_ppx_jane
53+
<test/*.ml{,i,y}>: use_bap-frames
54+
<test/*.ml{,i,y}>: use_bap-plugin-frames
5255
# OASIS_STOP

arch_bfd.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type bfd_architecture =
8080
| Bfd_arch_lm32
8181
| Bfd_arch_microblaze
8282
| Bfd_arch_last
83-
with sexp
83+
[@@deriving sexp]
8484

8585
type machine_t = int
8686

@@ -89,4 +89,3 @@ let mach_i386_i386 = 1
8989
let mach_x86_64 = 64
9090

9191
let mach_arm_5TE = 9
92-

arch_bfd.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ type bfd_architecture =
7878
| Bfd_arch_z80
7979
| Bfd_arch_lm32
8080
| Bfd_arch_microblaze
81-
| Bfd_arch_last
82-
with sexp
81+
| Bfd_arch_last
82+
[@@deriving sexp]
8383

8484
type machine_t = int
8585

0 commit comments

Comments
 (0)