package bap-std
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=a6e80853aaaa26b7ca564d9878891d7146ec1c83852541387c1bba1ad036b8ea
md5=13f2cb1e3b9d90348852252fb0f2d09f
doc/bap/Bap/Std/Disasm_expert/Backend/index.html
Module Disasm_expert.Backend
The interface for custom backends.
This is an OCaml interface for defining custom disassembling backends in pure OCaml. An alternative interface in C++ can be found at disasm.hpp and disasm.h.
The interface is pretty low-level and mimics one-to-one the existing C interface between OCaml and the C/C++ disassemblers backends, which, in turn, are optimized for performance.
The Basic.custom
function wraps the backend interface and enables seamless integration with the existing Basic.t
interface. To make the custom backend
available for your encoding
, use Basic.register encoding
function to register a constructor that uses Basic.custom
, e.g.,
let () = Basic.register encoding @@ fun target ->
let dis = create_custom target in
Ok (Basic.custom ?target encoding backend)
where create_custom
is a user function that creates the custom backend and target
contains the detailed information about the target system.
The Basic.lookup
function could be used then to lazily create the disassembler for the given encoding
, target
pair. The constructor will be called only once for each pair.
val sexp_of_predicate : predicate -> Ppx_sexp_conv_lib.Sexp.t
val predicate_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> predicate
val sexp_of_op : op -> Ppx_sexp_conv_lib.Sexp.t
val op_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> op
module type S = sig ... end
The backend interface.