Commit graph

492 commits

Author SHA1 Message Date
BartmanAbyss
6830660783 (M68k) make displacements signed (#836)
* (M68k) make displacements signed

* (M68k) revert group changes

* (m68k) signed displacement in python bindings
2017-01-01 01:11:48 +08:00
Nguyen Anh Quynh
f1aa0a3d04 python: version 4.0.0 2016-11-04 23:55:20 +08:00
Nguyen Anh Quynh
1b5846ee90 Merge branch 'feat/better_python_setup_next' of https://github.com/angr/capstone into angr-feat/better_python_setup_next 2016-11-04 23:25:27 +08:00
Andrew Dutcher
2f1c3ce8a6 On this branch, dylib and so files are versioned 2016-10-31 10:54:58 -07:00
Nguyen Anh Quynh
91808ab6cd python: cleanup 2016-10-30 16:19:10 +08:00
Andrew Dutcher
b2504b963e Python setup: Clean up some merge failures, adapt for changes on next branch 2016-10-26 23:15:42 -07:00
Andrew Dutcher
5acdd97ca2 Python: Actually attempt to load .so.3 extension on linux 2016-10-25 21:49:59 -07:00
Andrew Dutcher
97fac00499 Python: Spelling/capitalization/contact fixes in readme 2016-10-25 21:49:58 -07:00
Andrew Dutcher
73f92384ee Minor english fixes 2016-10-25 21:49:58 -07:00
Andrew Dutcher
06b26efbf4 Python: remove special case for cygwin build 2016-10-25 21:49:58 -07:00
Andrew Dutcher
816f131d27 Python: Make cython work with extreme prejudice 2016-10-25 21:49:58 -07:00
Andrew Dutcher
1008716ee5 Python: Clean up the capstone-windows stuff with extreme prejudice 2016-10-25 21:48:41 -07:00
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
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
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
16477206564745782854e0ec5c68defa02429dd8, 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 16477206564745782854e0ec5c68defa02429dd8 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
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