Skip to content

Commit ec01911

Browse files
committed
Bap trace plugin
1 parent dca03f6 commit ec01911

18 files changed

+3848
-3157
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
*.ba*
2+
*.clib
3+
*.mldylib
4+
*.mllib
5+
*.mlpack
6+
*.odocl
7+
/*.1
8+
/*.bak
9+
/*.byte
10+
/*.docdir
11+
/*.native
12+
/Makefile
13+
/_build/
14+
/_tags
15+
/configure
16+
/doc
17+
/myocamlbuild.ml
18+
/postinstall.ml
19+
/python/*.pyc
20+
/python/bap.egg-info
21+
/setup.data
22+
/setup.log
23+
/setup.ml
24+
META

.merlin

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
EXT here
2+
EXT nonrec
3+
EXT ounit
4+
5+
FLG -short-paths
6+
FLG -w -4-33-40-41-42-43-34-44
7+
8+
PKG camlzip
9+
PKG core_kernel
10+
PKG fileutils
11+
PKG jsonm
12+
PKG ocamlbuild
13+
PKG ocamlgraph
14+
PKG uuidm
15+
PKG bap
16+
PKG uri
17+
PKG sexplib
18+
PKG cmdliner
19+
20+
B _build
21+
B _build/plugin
22+

META

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: 043d7edb52f5d422d6ff26da03c2bdef)
2+
# DO NOT EDIT (digest: c0a6f728d153ac905924d15441ae661a)
33
version = "0.1"
44
description = "BAP Trace Format"
5-
requires = "core_kernel piqirun.pb piqirun.ext piqilib"
5+
requires = "core_kernel piqirun.pb piqirun.ext piqilib sexplib.syntax"
66
archive(byte) = "bap-traces.cma"
77
archive(byte, plugin) = "bap-traces.cma"
88
archive(native) = "bap-traces.cmxa"
99
archive(native, plugin) = "bap-traces.cmxs"
1010
exists_if = "bap-traces.cma"
11+
package "plugin" (
12+
version = "0.1"
13+
description = "BAP Trace Format"
14+
requires = "bap bap-traces"
15+
archive(byte) = "bap-traces-plugin.cma"
16+
archive(byte, plugin) = "bap-traces-plugin.cma"
17+
archive(native) = "bap-traces-plugin.cmxa"
18+
archive(native, plugin) = "bap-traces-plugin.cmxs"
19+
exists_if = "bap-traces-plugin.cma"
20+
)
1121
# OASIS_STOP
1222

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Overview
2+
Bap-traces library contains trace file format description on [piqi](http://piqi.org/) language. It also provide [qemu-tracer](https://github.com/BinaryAnalysisPlatform/qemu-tracer) trace files reader and plugin to [bap](https://github.com/BinaryAnalysisPlatform/bap) trace library.
3+

_oasis

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,25 @@ Library "bap-traces"
1111
BuildTools: ocamlbuild
1212
Modules: Trace_container, Frame_piqi, Frame_piqi_ext
1313
InternalModules: Arch_bfd
14-
BuildDepends: core_kernel, piqirun.pb, piqirun.ext, piqilib
14+
BuildDepends: core_kernel, piqirun.pb, piqirun.ext, piqilib, sexplib.syntax
1515
DataFiles: *.piqi
16+
17+
Library "bap-traces-plugin"
18+
Path: plugin
19+
BuildTools: ocamlbuild
20+
FindlibName: plugin
21+
FindlibParent: bap-traces
22+
Modules: Frame_trace_plugin
23+
InternalModules: Frame_events
24+
BuildDepends: bap, bap-traces
25+
26+
Executable tracedump
27+
Path: test
28+
MainIs: tracedump.ml
29+
BuildTools: ocamlbuild
30+
CompiledObject: best
31+
Install: false
32+
BuildDepends: bap, bap-traces, bap-traces.plugin, cmdliner
33+
34+
35+

_tags

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: fe79ebb5b238935cb0b98cd756ddda81)
2+
# DO NOT EDIT (digest: 18319d993797e2bd34bf113e924cf4e3)
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
6+
true: annot, bin_annot
67
<**/.svn>: -traverse
78
<**/.svn>: not_hygienic
89
".bzr": -traverse
@@ -15,8 +16,37 @@
1516
"_darcs": not_hygienic
1617
# Library bap-traces
1718
"bap-traces.cmxs": use_bap-traces
18-
<*.ml{,i}>: pkg_core_kernel
19-
<*.ml{,i}>: pkg_piqilib
20-
<*.ml{,i}>: pkg_piqirun.ext
21-
<*.ml{,i}>: pkg_piqirun.pb
19+
<*.ml{,i,y}>: pkg_core_kernel
20+
<*.ml{,i,y}>: pkg_piqilib
21+
<*.ml{,i,y}>: pkg_piqirun.ext
22+
<*.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
26+
<plugin/*.ml{,i,y}>: pkg_bap
27+
<plugin/*.ml{,i,y}>: pkg_core_kernel
28+
<plugin/*.ml{,i,y}>: pkg_piqilib
29+
<plugin/*.ml{,i,y}>: pkg_piqirun.ext
30+
<plugin/*.ml{,i,y}>: pkg_piqirun.pb
31+
<plugin/*.ml{,i,y}>: pkg_sexplib.syntax
32+
<plugin/*.ml{,i,y}>: use_bap-traces
33+
# Executable tracedump
34+
<test/tracedump.{native,byte}>: pkg_bap
35+
<test/tracedump.{native,byte}>: pkg_cmdliner
36+
<test/tracedump.{native,byte}>: pkg_core_kernel
37+
<test/tracedump.{native,byte}>: pkg_piqilib
38+
<test/tracedump.{native,byte}>: pkg_piqirun.ext
39+
<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
43+
<test/*.ml{,i,y}>: pkg_bap
44+
<test/*.ml{,i,y}>: pkg_cmdliner
45+
<test/*.ml{,i,y}>: pkg_core_kernel
46+
<test/*.ml{,i,y}>: pkg_piqilib
47+
<test/*.ml{,i,y}>: pkg_piqirun.ext
48+
<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
2252
# OASIS_STOP

arch_bfd.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(* File generated from arch.idl *)
22

3+
34
type bfd_architecture =
45
| Bfd_arch_unknown
56
| Bfd_arch_obscure
@@ -79,7 +80,9 @@ type bfd_architecture =
7980
| Bfd_arch_lm32
8081
| Bfd_arch_microblaze
8182
| Bfd_arch_last
82-
and machine_t = int
83+
with sexp
84+
85+
type machine_t = int
8386

8487
let mach_i386_i386 = 1
8588

arch_bfd.mli

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ type bfd_architecture =
7878
| Bfd_arch_z80
7979
| Bfd_arch_lm32
8080
| Bfd_arch_microblaze
81-
| Bfd_arch_last
82-
and machine_t = int
81+
| Bfd_arch_last
82+
with sexp
83+
84+
type machine_t = int
8385

8486
val mach_i386_i386 : int
8587
val mach_x86_64 : int

0 commit comments

Comments
 (0)