ocaml: rename cs_disasm() back to cs_disasm_quick(), which rightly reflects its nature

This commit is contained in:
Nguyen Anh Quynh 2014-09-28 23:56:02 +08:00
parent 6dc1dd5ae0
commit 82354b60ba
11 changed files with 12 additions and 11 deletions

View File

@ -55,6 +55,7 @@ type opt_value =
| CS_OPT_SYNTAX_ATT (* X86 ATT asm syntax (CS_OPT_SYNTAX). *) | CS_OPT_SYNTAX_ATT (* X86 ATT asm syntax (CS_OPT_SYNTAX). *)
| CS_OPT_SYNTAX_NOREGNAME (* Prints register name with only number (CS_OPT_SYNTAX) *) | CS_OPT_SYNTAX_NOREGNAME (* Prints register name with only number (CS_OPT_SYNTAX) *)
type cs_arch = type cs_arch =
| CS_INFO_ARM of cs_arm | CS_INFO_ARM of cs_arm
| CS_INFO_ARM64 of cs_arm64 | CS_INFO_ARM64 of cs_arm64
@ -80,7 +81,7 @@ type cs_insn0 = {
} }
external cs_open: arch -> mode list -> Int64.t option = "ocaml_cs_open" external cs_open: arch -> mode list -> Int64.t option = "ocaml_cs_open"
external cs_disasm: arch -> mode list -> string -> Int64.t -> Int64.t -> cs_insn0 list = "ocaml_cs_disasm" external cs_disasm_quick: arch -> mode list -> string -> Int64.t -> Int64.t -> cs_insn0 list = "ocaml_cs_disasm"
external _cs_disasm_internal: arch -> Int64.t -> string -> Int64.t -> Int64.t -> cs_insn0 list = "ocaml_cs_disasm_internal" external _cs_disasm_internal: arch -> Int64.t -> string -> Int64.t -> Int64.t -> cs_insn0 list = "ocaml_cs_disasm_internal"
external cs_reg_name: Int64.t -> int -> string = "ocaml_register_name" external cs_reg_name: Int64.t -> int -> string = "ocaml_register_name"
external cs_insn_name: Int64.t -> int -> string = "ocaml_instruction_name" external cs_insn_name: Int64.t -> int -> string = "ocaml_instruction_name"

View File

@ -47,7 +47,7 @@ let print_insn insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment, syntax) = x in let (arch, mode, code, comment, syntax) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter print_insn insns;; List.iter print_insn insns;;

View File

@ -93,7 +93,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -90,7 +90,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -73,7 +73,7 @@ let print_insn mode arch insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment, syntax) = x in let (arch, mode, code, comment, syntax) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode arch) insns;; List.iter (print_insn mode arch) insns;;

View File

@ -67,7 +67,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -64,7 +64,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -70,7 +70,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -72,7 +72,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -103,7 +103,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment, syntax) = x in let (arch, mode, code, comment, syntax) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;

View File

@ -70,7 +70,7 @@ let print_insn mode insn =
let print_arch x = let print_arch x =
let (arch, mode, code, comment) = x in let (arch, mode, code, comment) = x in
let insns = cs_disasm arch mode code 0x1000L 0L in let insns = cs_disasm_quick arch mode code 0x1000L 0L in
printf "*************\n"; printf "*************\n";
printf "Platform: %s\n" comment; printf "Platform: %s\n" comment;
List.iter (print_insn mode) insns;; List.iter (print_insn mode) insns;;