Commit Graph

632 Commits

Author SHA1 Message Date
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
Fish
8a5f7af308 Change pointer-deref-then-assignment to memmove to make PyPy happy. 2016-10-13 19:56:41 -07: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
399dd9da81 Merge pull request #764 from akihikodaki/next
arm: treat ARM address as unsigned
2016-09-07 09:51:04 +08:00
Nguyen Anh Quynh
eb110f66de Merge pull request #766 from akihikodaki/next_test
java: Rename Test class to TestBasic
2016-09-04 15:36:53 +08:00
Akihiko Odaki
e4c60c467f java: Rename Test class to TestBasic 2016-09-04 12:39:20 +09:00
Nguyen Anh Quynh
b7cc6e4ffd ocaml: recover test_basic.ml 2016-09-04 10:13:57 +08:00
Akihiko Odaki
e7e4e1dfda arm: treat ARM address as unsigned
It should be unsigned because:
* It does arithmetic operations
* Format strings have "%u" instead of "%d"

# Conflicts:
#	arch/ARM/ARMInstPrinter.c
#	bindings/python/test_arm.py
#	tests/test_arm.c
2016-09-04 00:13:50 +09:00
mrexodia
fb2c843f66 changed fcompi to fcomip and fucompi to fucomip 2016-08-30 23:10:04 +02:00
Nguyen Anh Quynh
e93290962c arm64: add NEGS & NGCS alias instructions. this fixes issue #752 2016-08-23 14:01:17 +08:00
Nguyen Anh Quynh
a4634b45dc Merge pull request #696 from emoon/m68k-reg-read-write
[M68K] Implemented regs read/write lists
2016-08-11 11:22:48 +08:00
Daniel Collin
147083be67 [M68K] Implemented regs read/write lists 2016-08-09 17:29:36 +02:00
Nguyen Anh Quynh
fae35cedac x86: properly handle SSE/AVX instructions 2016-07-15 20:37:19 +08:00
lucasg
8b1899d859 Replace copy.deepcopy by copy_ctypes_list for get_arch_info
This replacement was done for commit
1647720656, allowing the python binding to
be used in PyPy. It seems the m68k arch has been forgotten.
2016-07-09 14:38:01 +02:00
Pranith Kumar
ddaeb354ee Fix error return code 2016-06-29 11:08:13 -04:00
Andrew Dutcher
fcd06dedd7 Re-apply changes from 1647720656 on next branch, that's the commit that lets the python bindings run in pypy 2016-06-16 15:47:43 -07:00
Niels Boehm
06cc17d41c Fix typo in m68k constant for immediate operand. 2016-06-15 08:25:59 +02:00
Niels Boehm
78893a5473 Add m68k to the general Python tests. 2016-06-14 13:35:02 +02:00
Niels Boehm
901928e28d Add missing architectures to test_lite.py.
The code constants and the all_tests tuple is now analogous to
test_basic.py.
2016-06-14 13:28:14 +02:00
Niels Boehm
0f4ecc6ccc Use and test syntax against None in all_tests.
Comparing against 0 or just testing the truthiness is suboptimal, as you
lose the ability to explicitly set the syntax to CS_OPT_SYNTAX_DEFAULT
or 0.

Also, using None to mean "don't change" or other "here is no value"
interpretations is much more pythonic than the C-idiomatic 0.
2016-06-13 12:25:24 +02:00
Nguyen Anh Quynh
e3f94ac4ab fix merging conflict 2016-05-22 08:58:33 +08:00
Nguyen Anh Quynh
7b03323b8c Merge pull request #682 from ibabushkin/next
Reduced confusion caused by the m68k test being out of date
2016-05-14 18:19:36 +08:00
Nguyen Anh Quynh
820d7d02c7 Merge pull request #669 from zachriggle/next-mips
Add MIPS_GRP_INT and MIPS_GRP_CALL
2016-05-14 09:36:49 +08:00
Inokentiy Babushkin
bdb1d2988c Further refinements to the tests + python test fix for M68K 2016-05-13 18:39:32 +02:00
Nguyen Anh Quynh
27500352ae bindings: update Java & Ocaml after recent change on M68k interface 2016-05-12 21:47:48 +08:00
Inokentiy Babushkin
e488a7ed8e Fixed ordering in files 2016-05-12 08:57:25 +02:00
Inokentiy Babushkin
1b0779b97a Fixed python bindings to align with struct changes 2016-05-12 08:50:05 +02:00
Zach Riggle
1b3f07ad12 Add MIPS_GRP_XXX aliases for generic types. 2016-05-03 07:30:31 -07:00
Pranith Kumar
4a3af7b1c8 Handle python test failure properly 2016-04-30 13:12:16 -04:00
Nguyen Anh Quynh
6858c0f590 binding: remove cx_x86_op::fp following the change in the core 2016-04-24 00:16:08 +08:00
Sean Heelan
83cd155db2 __getattr__ should raise AttributeError, not return None, on failure
Fix for issue #624
2016-04-18 18:21:24 +08:00
Nguyen Anh Quynh
5c85a75d40 m68k: fix conflicts when merging with #625 2016-04-12 19:58:29 +07:00
Nguyen Anh Quynh
7fff673415 bindings: update after recent changes on some M68k enums 2016-04-12 18:47:19 +08:00
Nguyen Anh Quynh
c6397bf354 python: add access field for ARM64 2016-04-12 13:42:07 +08:00
Nicolas PLANEL
a66b4b425c update generated bindings 2016-04-11 23:05:11 +10:00
Nicolas PLANEL
c086c904d3 fixup indentation, mix of spaces and tabs 2016-04-11 23:03:45 +10:00
Daniel Collin
0bcb2e546c Various fixes
* Fixed a break indentation
* Fixed incorrect enum value for M68K_GRP_IRET
* Fixed so groups_count is set to 0 at init
* Added group_count printing in python example
2016-04-10 16:16:28 +02:00
jmechnich
52294728e5 bugfix: removed leading ./ from OBJDIR to avoid corrupting setup.py install 2016-03-25 22:31:13 +01:00
Nguyen Anh Quynh
a23f9d37ed add CS_OPT_UNSIGNED option to print immediate in unsigned form. only ARM is supported for now (issue #585) 2016-03-14 13:52:23 +08:00
Nguyen Anh Quynh
c69b6a921d Merge branch 'next' of https://github.com/aquynh/capstone into next 2016-03-06 21:28:16 +08:00
Nguyen Anh Quynh
3766ed1282 python: add __version__ 2016-03-06 21:27:55 +08:00
Michael Cohen
32923cf004 Added a missed dependency to MANIFEST.in to allow packaging of C src in the sdist. 2016-03-04 08:06:05 -08:00
Michael Cohen
40a42b4939 Fix setup.py to use setuptools and put the libcapstone.so in the right place. 2016-02-15 02:34:32 +01:00
Nguyen Anh Quynh
31f239f920 python: implement setter for skipdata_setup. this fixes issue 564 so it is now possible to redefine skipdata's mnemonic 2015-12-06 01:00:21 +07:00
Raijinili
6ea7ec83ad Python 3: CsError.__str__
Choose `CsError.__str__` implementation based on Python version.
2015-12-02 12:19:11 +07:00
Nguyen Anh Quynh
f99bf5a320 java: return empty instead of NULL for disasm(). patch by Keve Müller 2015-11-14 18:50:37 +08:00