Nguyen Anh Quynh | 26ee41a | 2013-11-27 12:11:31 +0800 | [diff] [blame] | 1 | This directory contains some test code to show how to use Capstone API. |
| 2 | |
Yegor Derevenets | 2c07346 | 2015-05-30 21:03:49 +0200 | [diff] [blame] | 3 | - test_basic.c |
Nguyen Anh Quynh | 26ee41a | 2013-11-27 12:11:31 +0800 | [diff] [blame] | 4 | This code shows the most simple form of API where we only want to get basic |
| 5 | information out of disassembled instruction, such as address, mnemonic and |
| 6 | operand string. |
| 7 | |
| 8 | - test_detail.c: |
| 9 | This code shows how to access to architecture-neutral information in disassembled |
| 10 | instructions, such as implicit registers read/written, or groups of instructions |
| 11 | that this instruction belong to. |
| 12 | |
Nguyen Anh Quynh | 2d752f9 | 2014-10-11 01:33:32 +0800 | [diff] [blame] | 13 | - test_skipdata.c: |
| 14 | This code shows how to use SKIPDATA option to skip broken instructions (most likely |
| 15 | some data mixed with instructions) and continue to decode at the next legitimate |
| 16 | instructions. |
| 17 | |
| 18 | - test_iter.c: |
| 19 | This code shows how to use the API cs_disasm_iter() to decode one instruction at |
| 20 | a time inside a loop. |
| 21 | |
Nguyen Anh Quynh | 627b901 | 2015-04-27 11:10:26 +0800 | [diff] [blame] | 22 | - test_customized_mnem.c: |
| 23 | This code shows how to use MNEMONIC option to customize instruction mnemonic |
| 24 | at run-time, and then how to reset the engine to use the default mnemonic. |
| 25 | |
Nguyen Anh Quynh | 26ee41a | 2013-11-27 12:11:31 +0800 | [diff] [blame] | 26 | - test_<arch>.c |
| 27 | These code show how to access architecture-specific information for each |
| 28 | architecture. |
tandasat | 45e5eab | 2016-05-11 21:48:32 -0700 | [diff] [blame] | 29 | |
| 30 | - test_winkernel.cpp |
| 31 | This code shows how to use Capstone from a Windows driver. |