99 Commits (e6c378e1edb61efb9f728550b97558dfb6328d9b)

Author SHA1 Message Date
Nguyen Anh Quynh c8e0785cb6 add some more comments regarding invalidating @handle of cs_close() 11 years ago
Nguyen Anh Quynh fbe10a55c0 simplify cs_close() when freeing @printer_info, making it future proof for future arch 11 years ago
Nguyen Anh Quynh ef3d04d75b fix a bug in cs_close(): improper check on handle value 11 years ago
Nguyen Anh Quynh 226d7dca64 change API cs_close() to take pointer to handle as argument. this lets us invalidate the closed handle 11 years ago
Nguyen Anh Quynh 48d583281c cs_support(): typecast query to uint before comparing with CS_ARCH_ALL. this is to avoid potential problems in future when we add more query types 11 years ago
Nguyen Anh Quynh 5848aaafb2 Revert "cs_disasm_ex() should verify handle->disasm() to catch the issue that this API is still called after cs_close(). bug reported by Gul" 11 years ago
Nguyen Anh Quynh 2edef8f27c cs_disasm_ex() should verify handle->disasm() to catch the issue that this API is still called after cs_close(). bug reported by Gul 11 years ago
Nguyen Anh Quynh f7cdbdf501 add CS_ERR_DIET error code to report information irrelevant in diet engine 11 years ago
Nguyen Anh Quynh b2870e4c4c API: extend cs_support() to allow query on diet mode. add CS_SUPPORT_DIET at the same time 11 years ago
Nguyen Anh Quynh fc83a439e5 add diet compile option (CAPSTONE_DIET option in config.mk). This reduces binary size by around 40% 11 years ago
Nguyen Anh Quynh 4f220287d1 add CS_ERR_VERSION to report error when binding version is different from core's API version 11 years ago
Nguyen Anh Quynh 8ce50e4b49 x86: fix the returned value of cs_disasm_ex() when we have 2 consecutive prefixed instructions. also fix a mem leak bug 11 years ago
Nguyen Anh Quynh 94020d8478 x86: fix the issue with prefix instruction declared in 2.0's RELEASE_NOTES 11 years ago
Nguyen Anh Quynh 743ead0442 fix a bug in cs.c introduced in the last port between branches 11 years ago
Nguyen Anh Quynh a82a0890a6 more more fixes on C coding style 11 years ago
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). 11 years ago
Nguyen Anh Quynh 11b05193ec reset prev_prefix at the entry of cs_disasm_ex(). this fixes a nasty segfault bug 11 years ago
Nguyen Anh Quynh fd2814b71a reset prev_prefix at the entry of cs_disasm_ex(). this fixes a nasty segfault bug 11 years ago
Nguyen Anh Quynh c34959b588 x86: proper calculation for the trailing instruction in total cache. issue reported by Pancake 11 years ago
Nguyen Anh Quynh c36ce95d4a x86: proper calculation for the trailing instruction in total cache. issue reported by Pancake 11 years ago
Nguyen Anh Quynh 06b3c05e20 cs_open() should return error on invalid mode 11 years ago
Nguyen Anh Quynh 53fc5c103a cs_open() should return error on invalid mode 11 years ago
Nguyen Anh Quynh 7772d859af x86: fix known issue with prefix by combining with previous prefix instruction. this is not perfect, but good enough for now 11 years ago
Nguyen Anh Quynh c272e9d000 do not use constructor to enable archs, so code is more portable. suggested by Alex Ionescu 11 years ago
Nguyen Anh Quynh 24e122778c cs_op_count() & cs_op_index() report CS_ERR_DETAIL when detail = OFF 11 years ago
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 11 years ago
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 11 years ago
Nguyen Anh Quynh d159a03f23 tests: proper extensions for newly added static executables 11 years ago
Nguyen Anh Quynh 625b5bcfee comment for the trick to enable constructors in static lib & fix coding style 11 years ago
danghvu b33bd2cb13 Update static fix: no need to call dummy function 11 years ago
danghvu ad44e8178e Minor bug 11 years ago
danghvu 701b850af9 Fix: bug that static link does not know constructor 11 years ago
Nguyen Anh Quynh 39b812d9e9 switch detail to be CS_OPT_OFF by default 11 years ago
Nguyen Anh Quynh 9fac512efc no longer need to free insn_cache for each arch: simply do it from cs_close() 11 years ago
Nguyen Anh Quynh 1acfd0b883 move insn_cache into cs_struct to gurantee thread-safe 11 years ago
Nguyen Anh Quynh 8f7ab4981d fix a potential memleak in cs_open() - happened when arch is invalid/unsupported 11 years ago
Nguyen Anh Quynh c52352d6d9 add new error code CS_ERR_MEMSETUP to report error when user-defined dynamic mem management is uninitialized 11 years ago
Nguyen Anh Quynh 59492c2688 enable system's my_malloc/calloc/realloc/free via compile time option 11 years ago
Nguyen Anh Quynh c7404075ff move internal memory management declarations from utils.h to cs_priv.h 11 years ago
Nguyen Anh Quynh 24bf0d9079 add new option CS_OPT_MEM for cs_option(): this enable user-defined dynamic memory management. idea proposed by Pancake 11 years ago
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() 11 years ago
Nguyen Anh Quynh ee143c8c6c fix a crashed bug in cs_close(): call destroy function before freeing handle's memory 11 years ago
Nguyen Anh Quynh b265406960 cache insns for fast lookup in mapping.c. based on the idea of Dang Hoang Vu 11 years ago
Nguyen Anh Quynh 42c6b1acc7 initial support for PPC 11 years ago
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() 11 years ago
Nguyen Anh Quynh 04c19beefe rename API cs_disasm_dyn() to cs_disasm_ex(), and intentionally breaks compatibility with 1.0 11 years ago
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 11 years ago
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() 11 years ago
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 11 years ago
Nguyen Anh Quynh 9a197b35a1 nullify handle when cs_open() fails. besides, return CS_ERR_ARCH when arch is unsupported 11 years ago