package binsec
Module Binpatcher.PatchMap
val empty : tThe empty patch map
val load_file : string -> tload_file filename loads patches contained in filename
The patches can be given in the following format, defined in file parser/parser.mly:
- (address "....")
- (address (i_1 ... i_n))
i.e. the file contains a list of small S-expressions where:
- the first element is an address (hexadecimal or decimal integer);
the second element is either
- a string (interpreted as a sequence of bytes);
- or a (non-empty) list of integers, where each integer corresponds to a byte (0 <= n <= 255).
val of_list : (Virtual_address.t * Binstream.t) list -> tof_list l converts an association list l of addresses to opcodes to a patch map
val add_bytes : Virtual_address.t -> Binstream.t -> t -> tadd_bytes address bytes patchmap writes the opcode bytes to address in the patchmap. The full length of the byte sequence is writtent starting at address.