Nguyen Anh Quynh
143759d9ab
x86: update core
2014-02-24 23:30:45 +08:00
Nguyen Anh Quynh
f7cdbdf501
add CS_ERR_DIET error code to report information irrelevant in diet engine
2014-02-24 16:47:36 +08:00
Nguyen Anh Quynh
544e0ff611
explicitly warning about diet mode for some APIs in capstone.h
2014-02-23 20:24:47 +08:00
Nguyen Anh Quynh
c70adc30e8
clarify some comments regarding 'diet' mode in capstone.h
2014-02-23 00:03:46 +08:00
Nguyen Anh Quynh
b2870e4c4c
API: extend cs_support() to allow query on diet mode. add CS_SUPPORT_DIET at the same time
2014-02-22 23:41:16 +08:00
Nguyen Anh Quynh
fc83a439e5
add diet compile option (CAPSTONE_DIET option in config.mk). This reduces binary size by around 40%
2014-02-22 23:26:27 +08:00
Enzo Matsumiya
6bc08a850a
Fix the X86_REL_ADDR macro in x86.h
2014-02-19 22:07:36 +08:00
Nguyen Anh Quynh
8b915ed765
ppc: update core
2014-02-19 17:01:44 +08:00
Nguyen Anh Quynh
43a9a9d36f
bump API version from 2.0 to 2.1 for core + Python & Java bindings
2014-02-19 15:18:44 +08:00
Nguyen Anh Quynh
bc0b3b92fd
mips: update core
2014-02-19 15:13:20 +08:00
Nguyen Anh Quynh
6b804dacb1
arm: update core
2014-02-19 12:52:50 +08:00
Nguyen Anh Quynh
a86a1279ff
Merge branch 'msvc0' into next1
2014-02-17 23:11:58 +08:00
Nguyen Anh Quynh
4f220287d1
add CS_ERR_VERSION to report error when binding version is different from core's API version
2014-02-09 00:19:15 +08:00
Nguyen Anh Quynh
13f40d26a2
x86: upgrade core
2014-02-07 22:06:33 +08:00
Nguyen Anh Quynh
eaeee31f64
Merge branch 'msvc' into test
2014-01-23 22:10:41 +08:00
Nguyen Anh Quynh
b57c90dd23
fix some issues introduced by MSVC port
2014-01-23 21:43:08 +08:00
Alex Ionescu
46018db884
Initial set of changes to support building with MSVC 2013. Right now there's a bunch fo assumptions in the .vcxproj file and some things are not as clean as they should be, but it does build a full build and works (at least the x86 side). The point of this initial checkpoint is to make sure that nothing breaks on the GCC side, that everyone is ok with the changes to the source (or if better fixes/typing can be done).
2014-01-22 09:45:00 -08:00
Nguyen Anh Quynh
06b3c05e20
cs_open() should return error on invalid mode
2014-01-21 15:27:19 +08:00
Nguyen Anh Quynh
53fc5c103a
cs_open() should return error on invalid mode
2014-01-21 15:26:02 +08:00
Nguyen Anh Quynh
dd40750aa3
change header guards to have CAPSTONE_ as prefix. suggested by Markus Elfring
2014-01-19 23:52:45 +08:00
Nguyen Anh Quynh
747c4eff69
change header guards to have CAPSTONE_ as prefix. suggested by Markus Elfring
2014-01-19 23:51:34 +08:00
Nguyen Anh Quynh
9dfdae6421
x86: add new instructions: FSETPM, SALC, GETSEC & INT1. bug reported by Pancake
2014-01-19 22:40:31 +08:00
Nguyen Anh Quynh
64d4083c8f
add solaris support, and add make.sh
2014-01-17 20:55:21 +08:00
Nguyen Anh Quynh
bdd1e340dd
remove 'restrict' keyword in the definition of cs_vsnprintf(). also compile tests/* with -L option
2014-01-16 12:34:06 +08:00
Nguyen Anh Quynh
56aba591cc
correct some comments on CS_OPT_MEM option
2014-01-15 21:24:28 +08:00
Nguyen Anh Quynh
edeeb04a1a
make vsnprintf() user-defined function pointer, which is passed in via the same CS_OPT_MEM option like malloc/calloc etc
2014-01-15 20:44:03 +08:00
Nguyen Anh Quynh
0636f68331
increase size of @op_str to 160 to contain long operand string of some Neon Arm instructions
2014-01-15 17:51:08 +08:00
Nguyen Anh Quynh
9cc56a3322
arm: update core
2014-01-15 16:01:55 +08:00
Nguyen Anh Quynh
2f05ab2af5
add some comments on the availability of some APIs relying on detail = ON
2014-01-15 11:07:28 +08:00
Nguyen Anh Quynh
75ef2426ea
mips: update core
2014-01-14 23:08:20 +08:00
Nguyen Anh Quynh
b99aec8791
increase sizes of @op_str & ARM @operands to contain some ARM instructions with super long list of registers. issue reported by Deroko of ARTeam
2014-01-13 23:29:39 +08:00
Nguyen Anh Quynh
a8eb7a5ca5
rename memory function pointer types to have cs_ prefix. also rename internal function pointers my_* to have cs_mem_ prefix - suggested by Pancake
2014-01-11 12:55:31 +08:00
Nguyen Anh Quynh
c263d350f7
correct comments on CS_OPT_ON/OFF regarding default detail option
2014-01-07 23:50:02 +08:00
Nguyen Anh Quynh
cf89cf60db
cosmetic fix for capstone.h
2014-01-06 09:08:35 +08:00
Nguyen Anh Quynh
c52352d6d9
add new error code CS_ERR_MEMSETUP to report error when user-defined dynamic mem management is uninitialized
2014-01-06 09:06:30 +08:00
Nguyen Anh Quynh
57aa8eca05
change argument type of cs_support() API from cs_arch to int. this is to give us more flexibility to use this API to check other stuffs in future
2014-01-06 00:03:29 +08:00
Nguyen Anh Quynh
a60ed8b044
more instructions on CS_OPT_MEM
2014-01-05 23:52:30 +08:00
Nguyen Anh Quynh
ac9c076fdf
minor fix for instruction on CS_OPT_MEM
2014-01-05 23:42:50 +08:00
Nguyen Anh Quynh
24bf0d9079
add new option CS_OPT_MEM for cs_option(): this enable user-defined dynamic memory management. idea proposed by Pancake
2014-01-05 11:19:04 +08:00
Nguyen Anh Quynh
af6ca7e20a
ppc: add branch hint support to cs_ppc struct
2014-01-05 01:05:22 +08:00
Nguyen Anh Quynh
f1d489b949
ppc: support details information
2014-01-05 00:00:05 +08:00
Nguyen Anh Quynh
34f96389a9
add new API: cs_strerror() return a string describing a given error code. this should be used together with cs_errno()
2014-01-03 22:49:07 +08:00
Nguyen Anh Quynh
ee143c8c6c
fix a crashed bug in cs_close(): call destroy function before freeing handle's memory
2014-01-03 21:51:59 +08:00
Nguyen Anh Quynh
b265406960
cache insns for fast lookup in mapping.c. based on the idea of Dang Hoang Vu
2014-01-03 17:08:58 +08:00
Nguyen Anh Quynh
ae3649ff71
rename some C header guards to be without _ as prefix to follow naming convention of C language. suggested by Markus Elfring
2014-01-02 13:15:07 +08:00
Nguyen Anh Quynh
0b4c1237df
ppc: change type @disp to int32_t, and add @update_cr0 to cs_ppc struct
2014-01-02 12:02:59 +08:00
Nguyen Anh Quynh
4d22779f1c
add the missing include/ppc.h
2013-12-31 21:01:01 +08:00
Nguyen Anh Quynh
42c6b1acc7
initial support for PPC
2013-12-30 00:15:25 +08:00
Nguyen Anh Quynh
0cb3d6cb24
we broke compatibility of bunch of important APIs, so bump API version to 2.0 rather than 1.1
2013-12-28 14:00:18 +08:00
Nguyen Anh Quynh
b90cb993ed
API cs_version_ex(): since we already broke API compatibility, we are not afraid to break cs_version() too. this replaces cs_version() with cs_version_ex()
2013-12-28 13:59:09 +08:00
Nguyen Anh Quynh
04c19beefe
rename API cs_disasm_dyn() to cs_disasm_ex(), and intentionally breaks compatibility with 1.0
2013-12-25 13:26:22 +08:00
Nguyen Anh Quynh
4fe224b1ed
change API cs_disasm_dyn(): break cs_insn into 2 structures, and put all details into new structure cs_detail. this break API compatibility
2013-12-24 16:49:36 +08:00
Nguyen Anh Quynh
2296d5e926
add macro CS_MAKE_VERSION, which is handy to create combined version from major & minor version so that can be compared to the result of cs_version_ex()
2013-12-22 21:01:17 +08:00
Nguyen Anh Quynh
b880678a25
old cs_version() and new cs_version() are not compatible, so revert old one, and create new separate API cs_version_ex()
2013-12-22 15:20:07 +08:00
Nguyen Anh Quynh
0877747bcd
cs_version() can accept NULL arguments. this is useful if you dont care about major/minor, but only want to get returned combined version
2013-12-22 14:16:28 +08:00
Nguyen Anh Quynh
39a42eddfb
Change the way of supporting arch modularization
...
- Always use libapstone.so as library name, no matter which archs are compiled in.
- Add new API cs_support() to check if a particular arch is supported.
- Change cs_version(): return hexical version which encodes both major & minor version.
the return value can be comparable.
- Bump API version to 1.1
2013-12-22 10:40:58 +08:00
Nguyen Anh Quynh
f185180436
cleaner implementation for arch modularization
2013-12-21 12:16:47 +08:00
Nguyen Anh Quynh
7008356bc5
change cs_insn struct to follow the commit 18103e4a
. fixed Python & Java bindings accordingly. attn: bindings
2013-12-20 22:02:20 +08:00
Nguyen Anh Quynh
1bdb23a76d
add CS_OPT_MODE option. this allows us to change engine's mode at run-time
2013-12-20 00:04:26 +08:00
Nguyen Anh Quynh
d06e2f5ac1
arm: expose alias registers SB, SL, FP & IP. attn: bindings
2013-12-19 16:50:57 +08:00
Nguyen Anh Quynh
df3fb00ed7
arm: add comments to arm.h for coprocessor register types
2013-12-19 12:41:50 +08:00
Nguyen Anh Quynh
7957ed1def
arm64: add some alias registers. attn: bindings
2013-12-15 00:32:20 +08:00
Nguyen Anh Quynh
46a5afd810
add comment to clarify which information in cs_insn is available when CS_OPT_DETAIL = OFF
2013-12-14 11:52:06 +08:00
Nguyen Anh Quynh
4994c587ad
bindings: support new 'detail' option for java & python
2013-12-14 11:39:33 +08:00
Nguyen Anh Quynh
4d3e852fbb
detail option: provide instruction id even when detail option is OFF
2013-12-14 10:45:09 +08:00
Nguyen Anh Quynh
a209e67f8a
support to turn on/off building instruction details
2013-12-14 00:23:41 +08:00
pancake
f0e4eed89d
Use const on all read-only buffers
2013-12-11 22:14:42 +01:00
Nguyen Anh Quynh
ad89d25d05
mips: optimize Mips_map_register() to O(1). suggested by Pancake
2013-12-11 23:20:34 +08:00
Nguyen Anh Quynh
66f6c2283e
mips: fix NEGU alias instruction. bug reported by Pancake
2013-12-11 21:37:24 +08:00
Nguyen Anh Quynh
36df4bb6a7
revert the cs_version() API
2013-12-10 13:31:20 +08:00
Nguyen Anh Quynh
bb64b0bdca
more API version to capstone.h, and remove cs_version(). reset API back to 1.0 for public release
2013-12-10 07:56:17 +08:00
Nguyen Anh Quynh
bdaf3b5089
x86: delete useless constant values assigned for instructions in x86.h
2013-12-09 00:55:49 +08:00
Nguyen Anh Quynh
162409e730
mips: upgrade core engine
2013-12-08 20:17:28 +08:00
Nguyen Anh Quynh
731bf2a714
arm64: update core engine
2013-12-08 15:13:47 +08:00
Nguyen Anh Quynh
041e25dd66
add CS_ERR_OPTION type. cs_option() returns this error code on invalid option
2013-12-06 00:37:32 +08:00
Nguyen Anh Quynh
a236902656
fix CS_INSN_OFFSET: calculate offset based on the address of related instruction only
2013-12-05 20:21:09 +08:00
Nguyen Anh Quynh
a84d747f7c
fix typo in CS_INSN_OFFSET
2013-12-05 18:33:34 +08:00
Nguyen Anh Quynh
bb5460348b
add CS_INSN_OFFSET macro, so we can easily calculate offset of one insn, given its position in its array
2013-12-05 18:29:51 +08:00
Nguyen Anh Quynh
4d70daf83d
note that Intel is default syntax
2013-12-05 09:50:50 +08:00
Nguyen Anh Quynh
a2f825ff07
support comments in autogen files, so constant files are more friendly
2013-12-04 23:56:24 +08:00
Nguyen Anh Quynh
79976c1370
fix some comments in capstone.h
2013-12-04 23:03:13 +08:00
Nguyen Anh Quynh
8f13f3c6ab
rename @hex_code to @bytes, and move it to next to @size
2013-12-04 22:57:04 +08:00
Nguyen Anh Quynh
c45b1588ef
Merge branch 'master' of https://github.com/joxeankoret/capstone into hexcode
2013-12-04 19:28:54 +08:00
Joxean
367a4df66f
Partially reverted previous commit
...
I added mistakenly various local-only changes.
2013-12-04 07:15:45 +01:00
Joxean
114df0ef2a
Added @hex_code member
...
It's used to retrieve the bytes of the instruction.
2013-12-04 07:11:32 +01:00
Nguyen Anh Quynh
f8db76ab94
arm64: correct value of ARM64_SFT_ROR
2013-12-04 12:37:55 +08:00
Nguyen Anh Quynh
ea5b79d058
move some alias registers around to after REG_MAX. this seems to fix some issues of clang, which struggles with enum that assign value from other enum
2013-12-04 12:10:47 +08:00
Nguyen Anh Quynh
b39ef0bfa6
arm: added some alias registers
2013-12-04 11:52:28 +08:00
Nguyen Anh Quynh
da8adaded2
API cs_option(): @value now has size_t, so mapping opaque pointer is possible for future options
2013-12-04 09:44:07 +08:00
Nguyen Anh Quynh
c618db4473
change option names for cs_option(), and update python binding accordingly to support new cs_option()
2013-12-04 00:05:04 +08:00
Nguyen Anh Quynh
b8ce68ec05
change cs_option() API to be more flexible with option value
2013-12-03 23:45:08 +08:00
Nguyen Anh Quynh
01aba002e3
add cs_option() API. move ATT & Intel syntax here, rather than having them as CS_MODE, which is wrong
2013-12-03 21:00:09 +08:00
Nguyen Anh Quynh
612b5d23e8
consistently use same param name @address rather than @offset in all cs_disasm*() API
2013-12-03 12:23:09 +08:00
Nguyen Anh Quynh
f2a649e1ef
cs_insn.address also needs to be changed after the change on @offset of cs_disasm*() API
2013-12-03 12:21:01 +08:00
Nguyen Anh Quynh
7d5f96d3a7
merge Radare's pull request on API change on @address of cs_disasm*()
2013-12-03 11:53:42 +08:00
Nguyen Anh Quynh
029df200b4
add some comments referring to cs_errno() on failure of some APIs
2013-12-03 11:36:54 +08:00
Nguyen Anh Quynh
f35e2ad35c
add @regs_read_count, @regs_write_count, @groups_count to @cs_insn. bump API to 1.4
2013-12-03 11:10:26 +08:00
pancake
c04f873791
Use uint64_t instead of size_t for addresses
2013-12-03 02:51:46 +01:00
Nguyen Anh Quynh
3582bc1b9b
arm64: ARM64_GRP_JUMP is in the wrong place. move it to its place and also clarify some GRP comments
2013-12-03 09:43:27 +08:00
Nguyen Anh Quynh
ec0ed8ee94
semantics: add insn group JUMP, so now we can check if this insn is branching
2013-12-02 13:55:38 +08:00
Nguyen Anh Quynh
173ed2b1cb
arm: upgrade core engine
2013-12-01 22:19:27 +08:00
Nguyen Anh Quynh
270d8ae712
Merge branch 'master' into x86
2013-12-01 00:28:38 +08:00
Nguyen Anh Quynh
3640f3cc73
clarify in capstone.h that no API accepts CS_ARCH_* as handle anymore
2013-12-01 00:26:27 +08:00
Nguyen Anh Quynh
36d143b6d0
x86: update core engine
2013-12-01 00:05:22 +08:00
Nguyen Anh Quynh
6b9b6647c1
arm64: support more alias insn
2013-11-30 12:28:56 +08:00
Nguyen Anh Quynh
6b7abe3c81
arm64: handle alias insn in a better way, and add support for MNEG. bug reported by Patroklos Argyroudis
2013-11-30 00:54:24 +08:00
Nguyen Anh Quynh
f1656de40a
reduce the size of @operands for arm & arm64
2013-11-29 20:26:34 +08:00
Nguyen Anh Quynh
90acea3530
fix arm64_op_mem & arm64_op_type structures: int32_t is enough for imm & disp
2013-11-29 17:54:17 +08:00
Nguyen Anh Quynh
b42a657873
change cs_disasm() and cs_disasm_dyn() to be portable API. fix related code using these API
2013-11-29 17:40:07 +08:00
Nguyen Anh Quynh
26ee41aa67
initial import
2013-11-27 12:11:31 +08:00