Skip to content

Commit 6f967a6

Browse files
authored
fixes bapdoc (#1345)
Despite that ocaml/odoc#539 is fixed long time ago it never landed into the 1.x branch of odoc, which is the stable and the released version. All beta versions do not have the stack overflow bug on core_kernel, but render unreadable documentation (tried 2.0.0-beta till the latest master). Therefore, we had to fallback to the `--no-pkg-deps` workaround, so that we can get at least the BAP documentation. Note, this workaround means that the links to core kernel and other external libraries will be broken, only links across bap universe will work.
1 parent a9b8a32 commit 6f967a6

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build: setup.ml
99

1010
.PHONY: doc
1111
doc:
12-
@ocamlbuild -pkgs bap,bap-plugins,core_kernel,core_kernel.caml_unix tools/bapdoc.native
12+
@ocamlfind ocamlopt -linkpkg -package bap-plugins,core_kernel,core_kernel.caml_unix tools/bapdoc.ml -o bapdoc.native
1313
make -C doc
1414

1515
all:

tools/bapdoc.ml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,23 @@ let libraries = [
2222
"regular", "Regular.Std", "Regular", "Regular Data Library";
2323
"graphlib", "Graphlib.Std", "Graphlib", "Algorithms on graphs";
2424
"bitvec", "Bitvec", "", "Bitvectors and modular arithmetic";
25+
"bitvec-binprot", "Bitvec_binprot", "",
26+
"Provides Binprot serialization for bitvectors";
27+
"bitvec-sexp", "Bitvec_sexp", "",
28+
"Provides s-exp serialization for bitvectors";
29+
"bitvec-order", "Bitvec_order", "",
30+
"Implements Janestreet comparators for bitvectors";
2531
"bap-future", "Bap_future.Std", "Bap_future", "Futures and Streams";
2632
"ogre", "Ogre", "", "A sexp-based NoSQL database";
2733
];
2834

2935
"Hardware Specific Libraries", [
30-
"bap-arm", "ARM", "", "ARM-specific definitions";
31-
"bap-x86-cpu", "X86_cpu", "", "x86/x86-64 specific definitions";
36+
"bap-arm", "ARM", "", "ARM definitions";
37+
"bap-x86-cpu", "X86_cpu", "", "x86/x86-64 definitions";
38+
"bap-mips", "Bap_mips_target", "", "MIPS definitions";
39+
"bap-powerpc", "Bap_powerpc_target", "", "PowerPC definitions";
40+
"bap-riscv", "Bap_riscv_target", "", "RISCV definitions";
41+
"bap-systemz", "Bap_systemz_target", "", "SystemZ definitions";
3242
];
3343

3444
"Language and API/ABI Specific Libraries", [
@@ -37,21 +47,34 @@ let libraries = [
3747
"bap-c", "Bap_c.Std", "Bap_c", "Basic definitions of the C language";
3848
];
3949

50+
"Analyses and Auxiliary Libraries", [
51+
"bap-primus-track-visited", "Bap_primus_track_visited", "",
52+
"The interface to the Primus coverage monitoring component";
53+
"bap-beagle-prey", "Bap_beagle_prey", "",
54+
"An interface to the Beagle string deobfuscation analysis";
55+
56+
];
57+
4058
"Utility Libraries", [
4159
"bap-bml", "Bap_bml", "", "writing term transformations";
4260
"bare", "Bare", "", "writing rules for matching for Primus observations";
4361
"bap-bundle", "Bap_bundle.Std", "Bap_bundle", "creating and opening bundles";
62+
"bap-build", "Bap_build.Std", "Bap_build", "building bapbuild plugins";
4463
"bap-byteweight", "Bap_byteweight", "", "interface to the Byteweight subsystem";
4564
"bap-demangle", "Bap_demangle.Std", "Bap_demangle", "writing name demanglers";
46-
"bap-dwarf", "Bap_dwarf.Std", "Bap_dwarf", "a native DWARF parser";
65+
"bap-dwarf", "Bap_dwarf.Std", "Bap_dwarf", "a native DWARF parser" ;
66+
"bap-elf", "Bap_elf.Std", "Bap_elf", "a native ELF parser";
4767
"bap-ida", "Bap_ida.Std", "Bap_ida","an interface to IDA Pro";
4868
"bap-llvm", "Bap_llvm.Std", "Bap_llvm", "an inteface to LLVM disassemblers and loaders";
69+
"bap-ghidra", "Bap_ghidra", "Bap_ghidra", "an inteface to Ghidra";
4970
"bap-plugins", "Bap_plugins.Std", "Bap_plugins", "loading plugins";
5071
"bap-recipe", "Bap_recipe", "", "loading recipes (packs of command line arguments)";
5172
"bap-strings", "Bap_strings.Std", "Bap_strings", "various text utilities";
73+
"bap-relation", "Bap_relation", "", "A representation of relations between two sets";
5274
"bap-traces", "Bap_traces.Std", "Bap_traces", "working with execution traces";
5375
"text-tags", "Text_tags", "", "Extension of Format's semantic tags";
5476
];
77+
5578
]
5679

5780
let frontends = [
@@ -205,7 +228,7 @@ let generate () =
205228
Out_channel.close out;
206229
let pkgs = remove_unresolved packages |> String.concat ~sep:" " in
207230
run
208-
{|odig odoc --odoc-theme=odoc.default --index-title="BAP API" --no-tag-index --index-intro=%s %s|}
231+
{|odig odoc --odoc-theme=odoc.default --index-title="BAP API" --no-tag-index --no-pkg-deps --index-intro=%s %s|}
209232
intro pkgs;
210233
run @@ "ln -s $(odig cache path)/html odoc";
211234
Sys.remove intro

0 commit comments

Comments
 (0)