Bap_c_data
C Data model.
This module defines abstractions for C values.
A value is backed by a datum - a sequence of bits that represents the value. This module also defines models for integer representation.
The following table summarize all models of integer representation.
LP32 ILP32 ILP64 LLP64 LP64 char 8 8 8 8 8 short 16 16 16 16 16 int 16 32 64 32 32 long 32 32 64 32 64 addr 32 32 64 64 64
type value =
| Top
any possible value
*)| Set of Bap.Std.word list
one of the specified, Set []
is bot
A value lattice.
val bin_size_value : value Core_kernel.Bin_prot.Size.sizer
val bin_write_value : value Core_kernel.Bin_prot.Write.writer
val bin_writer_value : value Core_kernel.Bin_prot.Type_class.writer
val bin_read_value : value Core_kernel.Bin_prot.Read.reader
val __bin_read_value__ : (int -> value) Core_kernel.Bin_prot.Read.reader
val bin_reader_value : value Core_kernel.Bin_prot.Type_class.reader
val bin_value : value Core_kernel.Bin_prot.Type_class.t
val sexp_of_value : value -> Ppx_sexp_conv_lib.Sexp.t
val value_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> value
type 'd obj =
| Basic of Bap_c_type.basic
A value of a basic type
*)| Field of string * 'd
A struct or union field
*)| Undef
Undefined data (padding or code)
*)| Union of 'd list
Union of values
*)A C Object representation.
The type is parameterized with the object layout representation to enable the recursive definition of the generalized layout type.
val bin_size_obj :
'd Core_kernel.Bin_prot.Size.sizer ->
'd obj Core_kernel.Bin_prot.Size.sizer
val bin_write_obj :
'd Core_kernel.Bin_prot.Write.writer ->
'd obj Core_kernel.Bin_prot.Write.writer
val bin_writer_obj :
'd Core_kernel.Bin_prot.Type_class.writer ->
'd obj Core_kernel.Bin_prot.Type_class.writer
val bin_read_obj :
'd Core_kernel.Bin_prot.Read.reader ->
'd obj Core_kernel.Bin_prot.Read.reader
val __bin_read_obj__ :
'd Core_kernel.Bin_prot.Read.reader ->
(int -> 'd obj) Core_kernel.Bin_prot.Read.reader
val bin_reader_obj :
'd Core_kernel.Bin_prot.Type_class.reader ->
'd obj Core_kernel.Bin_prot.Type_class.reader
val bin_obj :
'd Core_kernel.Bin_prot.Type_class.t ->
'd obj Core_kernel.Bin_prot.Type_class.t
val sexp_of_obj :
('d -> Ppx_sexp_conv_lib.Sexp.t) ->
'd obj ->
Ppx_sexp_conv_lib.Sexp.t
val obj_of_sexp :
(Ppx_sexp_conv_lib.Sexp.t -> 'd) ->
Ppx_sexp_conv_lib.Sexp.t ->
'd obj
abstraction of a С datum.
The datum is a sequence of bits that represents a C object. We abstract datum as either an immediate value of the given size, or a sequence of data, or a pointer to a datum.
val bin_size_datum :
'd Core_kernel.Bin_prot.Size.sizer ->
's Core_kernel.Bin_prot.Size.sizer ->
('d, 's) datum Core_kernel.Bin_prot.Size.sizer
val bin_write_datum :
'd Core_kernel.Bin_prot.Write.writer ->
's Core_kernel.Bin_prot.Write.writer ->
('d, 's) datum Core_kernel.Bin_prot.Write.writer
val bin_writer_datum :
'd Core_kernel.Bin_prot.Type_class.writer ->
's Core_kernel.Bin_prot.Type_class.writer ->
('d, 's) datum Core_kernel.Bin_prot.Type_class.writer
val bin_read_datum :
'd Core_kernel.Bin_prot.Read.reader ->
's Core_kernel.Bin_prot.Read.reader ->
('d, 's) datum Core_kernel.Bin_prot.Read.reader
val __bin_read_datum__ :
'd Core_kernel.Bin_prot.Read.reader ->
's Core_kernel.Bin_prot.Read.reader ->
(int -> ('d, 's) datum) Core_kernel.Bin_prot.Read.reader
val bin_reader_datum :
'd Core_kernel.Bin_prot.Type_class.reader ->
's Core_kernel.Bin_prot.Type_class.reader ->
('d, 's) datum Core_kernel.Bin_prot.Type_class.reader
val bin_datum :
'd Core_kernel.Bin_prot.Type_class.t ->
's Core_kernel.Bin_prot.Type_class.t ->
('d, 's) datum Core_kernel.Bin_prot.Type_class.t
val sexp_of_datum :
('d -> Ppx_sexp_conv_lib.Sexp.t) ->
('s -> Ppx_sexp_conv_lib.Sexp.t) ->
('d, 's) datum ->
Ppx_sexp_conv_lib.Sexp.t
val datum_of_sexp :
(Ppx_sexp_conv_lib.Sexp.t -> 'd) ->
(Ppx_sexp_conv_lib.Sexp.t -> 's) ->
Ppx_sexp_conv_lib.Sexp.t ->
('d, 's) datum
val bin_size_layout : layout Core_kernel.Bin_prot.Size.sizer
val bin_write_layout : layout Core_kernel.Bin_prot.Write.writer
val bin_writer_layout : layout Core_kernel.Bin_prot.Type_class.writer
val bin_read_layout : layout Core_kernel.Bin_prot.Read.reader
val __bin_read_layout__ : (int -> layout) Core_kernel.Bin_prot.Read.reader
val bin_reader_layout : layout Core_kernel.Bin_prot.Type_class.reader
val bin_layout : layout Core_kernel.Bin_prot.Type_class.t
val sexp_of_layout : layout -> Ppx_sexp_conv_lib.Sexp.t
val layout_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> layout
type t = (value, Bap.Std.Size.t) datum
The datum that uses value lattice for object representation.
include Core_kernel.Bin_prot.Binable.S with type t := t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
val pp : Stdlib.Format.formatter -> t -> unit
pp ppf datum
prints the datum in a human-readable form.
val pp_layout : Stdlib.Format.formatter -> layout -> unit
pp_layout ppf layout
outputs layout in a human-readable form.