Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Mc_main
Sourcetype error =
| Bad_user_input
| Bad_insn of Bap.Std.mem * int * int
| Create_mem of Core_kernel.Error.t
| No_input
| Invalid_base of string
| Trailing_data of int
| Inconsistency of Bap_core_theory.KB.conflict
| Unknown_format of string * string * string list
| No_formats_expected of string
| Disassembler_failed of Core_kernel.Error.t
| Loader_failed of Core_kernel.Error.t
| Target_must_be_unknown
| Encoding_must_be_unknown
| Triple_must_not_be_set
| Arch_must_not_be_set
| Backend_must_not_be_set
| Cpu_must_not_be_set
| Bits_must_not_be_set
| Order_must_not_be_set
type target =
| Target of {
name : Bap_core_theory.Theory.Target.t;
encoding : Bap_core_theory.Theory.Language.t;
}
| Triple of {
name : string;
backend : string option;
cpu : string option;
order : Bap.Std.endian;
bits : int;
}
val bad_insn :
Bap.Std.Addr.t ->
('a, 'b, 'c, 'd) Dis.state ->
int ->
('e, Bap_main.Extension.Error.t) Core_kernel._result
val to_binary :
?map:(Core_kernel.String.t -> Core_kernel.String.t) ->
Core_kernel.String.t ->
(string, Bap_main.Extension.Error.t) Core_kernel.Result.t
to_binary ?escape s
make a binary string from ascii representation, (e.g., "\x01\x02..."). Apply optional escape function for each byte
val create_memory :
target ->
Base.string ->
Bap.Std.addr ->
(Bap.Std.Memory.t, Bap_main.Extension.Error.t) Core_kernel._result
val print :
target ->
Bap.Std.Memory.t ->
Bap.Std.Disasm_expert.Basic.full_insn ->
([> `addr
| `bil
| `bir
| `insn
| `kinds
| `knowledge
| `memory
| `sema
| `size ] ->
string list) ->
(unit, Bap_main.Extension.Error.t) Base.Result.t
val parse_base :
target ->
string ->
(Bap.Std.Word.t, Bap_main.Extension.Error.t) Core_kernel.Result.t
val create_disassembler :
target ->
((Dis.empty, Dis.empty) Dis.t, Bap_main.Extension.Error.t)
Core_kernel.Result.t
val validate_module :
[< `bil | `bir | `insn ] ->
Core_kernel.String.t list ->
(unit, error) Core_kernel.Result.t
val validate_formats :
([< `addr
| `bil
| `bir
| `insn
| `invalid
| `kinds
| `knowledge
| `memory
| `sema
| `size ]
* Core_kernel.String.t list)
list ->
(unit, Bap_main.Extension.Error.t) Core_kernel.Result.t
val run :
?only_one:bool ->
?stop_on_error:bool ->
('a, 'b) Dis.t ->
target ->
Bap.Std.Memory.t ->
([> `addr
| `bil
| `bir
| `insn
| `invalid
| `kinds
| `knowledge
| `memory
| `sema
| `size ] ->
Core_kernel.String.t list) ->
(int, Bap_main.Extension.Error.t) Core_kernel._result
val check_invariants :
(bool * (unit, 'a) Core_kernel.Result.t list) list ->
(unit, 'a) Core_kernel.Result.t
val check :
('a -> bool) ->
'a ->
error ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val target_must_be_unknown :
Bap_core_theory.Theory.Target.t ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val encoding_must_be_unknown :
Bap_core_theory.Theory.Language.t ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val triple_must_not_be_set :
'a option ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val arch_must_not_be_set :
'a option ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val backend_must_not_be_set :
'a option ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val bits_must_not_be_set :
'a option ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val order_must_not_be_set :
'a option ->
(unit, Bap_main.Extension.Error.t) Core_kernel._result
val compute_target :
(Bap_core_theory.Theory.Unit.t -> unit Bap_knowledge.Knowledge.t) ->
target
val make_triple :
?bits:int ->
?order:Bap.Std.endian ->
?backend:string ->
?cpu:string ->
string ->
target
val make_target :
Bap_core_theory.Theory.Target.t ->
Bap_core_theory.Theory.Language.t ->
target
val parse_arch :
string option ->
Bap_core_theory.Theory.Target.t ->
Bap_core_theory.Theory.Language.t ->
string option ->
string option ->
string option ->
int option ->
Bap.Std.endian option ->
(target, Bap_main.Extension.Error.t) Base.Result.t