bap-ida-plugin

Plugins for IDA and BAP integration
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library emit_ida_script_plugin
val name : string
val version : string
val doc : string
val argv : string array
val debug : ( 'a, Format.formatter, unit ) Core_kernel.format -> 'a
val info : ( 'a, Format.formatter, unit ) Core_kernel.format -> 'a
val warning : ( 'a, Format.formatter, unit ) Core_kernel.format -> 'a
val error : ( 'a, Format.formatter, unit ) Core_kernel.format -> 'a
val debug_formatter : Format.formatter
val info_formatter : Format.formatter
val warning_formatter : Format.formatter
val error_formatter : Format.formatter
val report_progress : ?task:string -> ?note:string -> ?stage:int -> ?total:int -> unit -> unit
module Config : sig ... end
module Buffer = Core_kernel.Caml.Buffer
val idacode_of_color : [> `black | `blue | `cyan | `gray | `green | `magenta | `red | `white | `yellow ] -> int

ida uses a strange color coding, bgr, IIRC

val string_of_color : Bap.Std.color -> string
module Py : sig ... end

Each function in this module should return a string that should be a valid piece of python code. Except for the prologue and epilogue all pieces should be independent of each other, so that they can be emitted to the script in an arbitrary order.

emit_attr buffer sub_name insn_addr attr emits into the buffer a python code that corresponds to the given attribute attr, that is attached to a term that occurs in the scope of a function with a name sub_name. If the term is non-artifical, then insn_addr is an address of a corresponding instruction, otherwise it is None.

val emit_attr : Buffer.t -> string -> Bap.Std.Word.t -> Bap.Std.Value.t -> unit
val program_visitor : Buffer.t -> Core_kernel.String.t list -> (string * Bap.Std.word option) Bap.Std.Term.visitor