capstone/tests
Nguyen Anh Quynh 0df7e93a3c Change the prototype of the callback in SKIPDATA option. Suggested by Ben Nagy.
Original prototype:
  typedef size_t (*cs_skipdata_cb_t)(const uint8_t *code, uint64_t offset, void* user_data);

Now we add @code_size argument to reflect the size of the input buffer @code.
Also, we change the data type of @offset to size_t because this argument indicates the
distance from currently examining bytes to @code, but not the address of the byte.

  typedef size_t (*cs_skipdata_cb_t)(const uint8_t *code, size_t code_size, size_t offset, void* user_data);
2014-07-10 15:42:16 +08:00
..
Makefile Fix minor style inconsistency 2014-07-04 23:39:59 +02:00
README initial import 2013-11-27 12:11:31 +08:00
test_arm64.c fixed test_arm64.c for VS2012 2014-05-09 21:11:29 +01:00
test_arm.c fixed test_arm.c for VS2012 2014-05-09 21:08:40 +01:00
test_detail.c add XCore architecture 2014-05-26 23:02:48 +08:00
test_mips.c fixed test_mips.c for VS2012 2014-05-09 21:14:19 +01:00
test_ppc.c fixed test_ppc.c for VS2012 2014-05-09 21:17:02 +01:00
test_skipdata.c Change the prototype of the callback in SKIPDATA option. Suggested by Ben Nagy. 2014-07-10 15:42:16 +08:00
test_sparc.c fixed test_detail.c for VS2012 2014-05-09 21:28:07 +01:00
test_systemz.c fixed test_detail.c for VS2012 2014-05-09 21:28:07 +01:00
test_x86.c x86: add @rex to cs_x86 struct. updated python & java binding for this change 2014-07-01 10:13:28 +08:00
test_xcore.c add XCore architecture 2014-05-26 23:02:48 +08:00
test.c add XCore architecture 2014-05-26 23:02:48 +08:00

This directory contains some test code to show how to use Capstone API.

- test.c
  This code shows the most simple form of API where we only want to get basic
  information out of disassembled instruction, such as address, mnemonic and
  operand string.

- test_detail.c:
  This code shows how to access to architecture-neutral information in disassembled
  instructions, such as implicit registers read/written, or groups of instructions
  that this instruction belong to.

- test_<arch>.c
  These code show how to access architecture-specific information for each
  architecture.