package bap-std

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A self reflection.

This is a generative functor module refers to an information bundled with an application. Use include Self() syntax to bring this definitions to the scope.

It is designed to be used inside a plugin, but can be used in a standalone program as well (this is usefull, for debugging plugins, by running them as a standalone applications).

If run in a standalone mode, then field name would be set to Sys.executable_name and argv to Sys.argv.

Parameters

Signature

val name : string

name of a plugin

val version : string

version number

val doc : string

A short, one-line description

val argv : string array

args name returns an array of arguments designated for a plugin with a given name.

The arguments will be extracted from Sys.argv array by removing all arguments that doesn't start with --name-. Then, from all command arguments that are left, the --name- prefix is substituted with --. For example, if argv contained [| "bap"; "-lcallgraph"; "--callgraph" "--callgraph-help"|] then pass that registered itself under callgraph name will receive the following array of arguments [| "callgraph"; --help |] . That means, that plugins can't accept arguments that are anonymous or short options

val debug : ('a, Format.formatter, unit) Core_kernel.Std.format -> 'a

debug fmt ... send a debug message

val info : ('a, Format.formatter, unit) Core_kernel.Std.format -> 'a

info fmt ... send an info message

val warning : ('a, Format.formatter, unit) Core_kernel.Std.format -> 'a

warning fmt ... send a warning message

val error : ('a, Format.formatter, unit) Core_kernel.Std.format -> 'a

error fmt ... send an error message

module Config : sig ... end

This module allows plugins to access BAP configuration variables.

OCaml

Innovation. Community. Security.