Commit Graph

2859 Commits

Author SHA1 Message Date
Andrew Dutcher
3b5b5ff58c Python: make setup work as expected 2016-10-25 21:48:18 -07:00
Nguyen Anh Quynh
c72ab6014f bindings: regenerate consts 2016-10-25 14:30:13 +08:00
Nguyen Anh Quynh
1e5a48535c add CS_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:29:21 +08:00
Nguyen Anh Quynh
3f1df56bf1 improve dependency on header files *.h, and remove clean from make.sh. see PR #793 2016-10-23 02:09:14 +08:00
Nguyen Anh Quynh
0382c90220 cstool: cleanup 2016-10-22 23:38:35 +08:00
Nguyen Anh Quynh
8922eca702 cstool: print out core version 2016-10-21 17:34:31 +08:00
Nguyen Anh Quynh
2f92635af9 cstool: fix compilation bug 2016-10-21 17:03:27 +08:00
Nguyen Anh Quynh
c194aeeab4 cstool: cleanup 2016-10-21 16:57:23 +08:00
YUHANG TANG
f811b77140 cstool: convert space to tab 2016-10-21 16:57:09 +08:00
YUHANG TANG
6423e59f25 Delete platform.h and fix wrong identation. 2016-10-21 16:56:43 +08:00
YUHANG TANG
97c5c098bb cstool version 2 2016-10-21 16:56:00 +08:00
YUHANG TANG
c6705984c0 cstool: version 2 could print all debug information for all arch. 2016-10-21 16:55:48 +08:00
YUHANG TANG
bb66912b28 cstool : print all debug information for all arch. 2016-10-21 16:55:28 +08:00
YUHANG TANG
089893ed98 cstool: add x86 debug information 2016-10-21 16:55:09 +08:00
Nguyen Anh Quynh
4e52d98ced cstool: prepare for multiple C sources 2016-10-19 23:01:58 +08:00
Nguyen Anh Quynh
e82a62cabe Merge branch 'next' of https://github.com/aquynh/capstone into next 2016-10-17 14:42:47 +08:00
Nguyen Anh Quynh
726d2b89f4 tests: cleanup 2016-10-17 14:42:32 +08:00
Nguyen Anh Quynh
abe33c4256 Merge pull request #792 from angr/fix/copy_via_memmove
Change pointer-deref-then-assignment to memmove to make PyPy happy.
2016-10-14 13:29:20 +08:00
Andrew Dutcher
081e7dc978 Fix two missing register operands in X86 AT&T syntax (#791)
* Bug fix: missing register operand in AT&T emitter for `movb %ax, imm`

* Bug fix: missing register operand in AT&T emitter for `movb %al, imm`
2016-10-14 13:26:27 +08:00
Fish
8a5f7af308 Change pointer-deref-then-assignment to memmove to make PyPy happy. 2016-10-13 19:56:41 -07:00
Nguyen Anh Quynh
2eefba3bf7 Makefile: remove extra / letter for install target 2016-10-13 20:45:24 +08:00
Nguyen Anh Quynh
3ab94f7d9c x86: RET read/write stack register. this fixes issue #790 2016-10-13 20:44:42 +08:00
Nguyen Anh Quynh
c5e661cbb8 cstool: compile with CMake using CMakeLists.txt in root dir 2016-10-11 23:24:44 +08:00
Nguyen Anh Quynh
d971fde0e8 cstool: initialize i in preprocess(). this fixes compilation issue for MSVC 2016-10-11 16:56:20 +08:00
Nguyen Anh Quynh
0c6cc6a044 cstool: support CMake 2016-10-11 16:51:20 +08:00
Nguyen Anh Quynh
d360b8bb17 cstool: align assembly code for x86 2016-10-11 16:19:27 +08:00
Nguyen Anh Quynh
5f55d75b28 cstool: update README with more details 2016-10-11 00:21:20 +08:00
Nguyen Anh Quynh
8f72ccbcb7 update .gitignore 2016-10-11 00:05:33 +08:00
Nguyen Anh Quynh
54d351ef48 cstool: compile for next branch 2016-10-11 00:04:46 +08:00
Nguyen Anh Quynh
98781416b5 cstool: make it compile with GCC on Linux 2016-10-11 00:03:19 +08:00
Nguyen Anh Quynh
bddd69514c cstool: fix Makefile 2016-10-11 00:02:08 +08:00
Nguyen Anh Quynh
d823a3ad4e cstool: add VERSION and reformat to use tabs for indentation 2016-10-11 00:01:57 +08:00
Nguyen Anh Quynh
9120204438 cstool: fix Makefile 2016-10-11 00:01:46 +08:00
Nguyen Anh Quynh
2dbd079321 cstool: compile/clean/install/uninstall from Makefile 2016-10-11 00:01:29 +08:00
echotyh
07337a708d cstool 1.0 (#788)
* first cstool -- Segmentation fault: 11

* Modify the format of output.

* Preprocess the input from user. The result of converting looks right but the disassembly is not unsatisfactory.

* Skip the character not in set A = {'a'~'f','A'~'F','0'~'9'}.
i Please enter the commit message for your changes. Lines starting

* delete cstool binary

* using isxdigit() to tests for any hexadecimal-digit character

* write README

* final version 1.0 for cstool
2016-10-10 23:54:25 +08:00
Richo Healey
57cbb8beeb Workaround unicorn handing back bytearrays 2016-10-06 14:40:37 +08:00
Benno Fünfstück
b446327f3b python-bindings: fix setup.py for wheel installation
When the python bindings are installed using the new wheels
infrastructure, data_files are relative to the site-packages directory
even if using absolute paths.

The following example demonstrates the bug fixed by this commit: (ran on archlinux)

```bash
$ pip install wheel       # if this package is installed, wheel installation is made the default
Collecting wheel
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
    100% |################################| 71kB 124kB/s
Installing collected packages: wheel
Successfully installed wheel-0.29.0

$ pip install capstone    # this will use the wheel installation method now
Collecting capstone
  Using cached capstone-3.0.4.tar.gz
Building wheels for collected packages: capstone
  Running setup.py bdist_wheel for capstone ... done
  Stored in directory: /root/.cache/pip/wheels/7c/d1/d0/db6e2c5ef1063aabb9de2dd8b92b4c27ee6f9fd213240099b8
Successfully built capstone
Installing collected packages: capstone
Successfully installed capstone-3.0.4

$ find /usr/lib/ -name "libcapstone.so"
/usr/lib/python3.5/site-packages/usr/lib/python3.5/site-packages/capstone/libcapstone.so
```

So the path `SITE_PACKAGES` in the `data_files` specification of the
setup.py file was interpreted relative to the python site-packages
directory. The fix for this is simple: use `/capstone` instead of an
absolute path for `SITE_PACKAGES`.
2016-10-03 10:50:08 +08:00
Nguyen Anh Quynh
71a42c13c6 python: cast skipdata function inside binding to simplify the API 2016-10-02 01:35:28 +08:00
Nguyen Anh Quynh
0cac0ec5e8 python: fix CS_SKIPDATA_CALLBACK prototype 2016-10-01 01:31:24 +08:00
Nguyen Anh Quynh
532a49dbf0 Merge pull request #781 from tandasat/next
PR #779 plus more warning suppression and compile error fix
2016-09-29 08:49:03 +08:00
Satoshi Tanda
cda8f0eb78 add explanation comment for use of CAPSTONE_API
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-28 17:22:36 -07:00
Satoshi Tanda
02609c367c fix compile error with capstone_static_winkernel
The MSVC project capstone_static_winkernel uses __stdcall as a
default calling convention to fit with environment for Windows driver
development. This leads to a compile error in a use of qsort() with
regs_cmp() since it is compiled as a __stdcall function while qsort()
expects a __cdelc function.

This fix adds explicit calling convention to regs_cmp() for MSVC.

Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-28 08:00:22 -07:00
Satoshi Tanda
c6592d5c7e suppress MSVC code analysis (PREfast) warnings for m68k
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-28 07:59:25 -07:00
Satoshi Tanda
c7b00b3756 suppress MSVC code analysis (PREfast) warnings
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-28 07:33:39 -07:00
Satoshi Tanda
3931106326 ignore MSVC project upgrade files
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-28 07:33:27 -07:00
Satoshi Tanda
cb003974a4 fix typo, style
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-28 07:33:14 -07:00
Ole André Vadla Ravnås
de995b0edd Fix use of uninitialized value for some instructions
Caught by Valgrind:

    Conditional jump or move depends on uninitialised value(s)
       at 0xD5BB6F: readModRM (X86DisassemblerDecoder.c:1528)
       by 0xD5BF02: getIDWithAttrMask (X86DisassemblerDecoder.c:1101)
       by 0xD5CC5E: getID (X86DisassemblerDecoder.c:1249)
       by 0xD5CC5E: decodeInstruction (X86DisassemblerDecoder.c:2335)
       by 0xD52009: X86_getInstruction (X86Disassembler.c:822)
       by 0xD51781: cs_disasm (cs.c:503)
2016-09-27 08:51:16 +08:00
Nguyen Anh Quynh
53a4473c92 arm: update imm in printOperand() to fix error reported by @trufae in PR #764 2016-09-22 22:22:36 +08:00
mrexodia
7a0b6374fe fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 23:30:24 +07:00
Nguyen Anh Quynh
f1e5ecd6eb Merge branch 'next_check' of https://github.com/akihikodaki/capstone into akihikodaki-next_check 2016-09-12 23:07:22 +07:00