capstone/bindings/python
Rot127 9c5b48b57f
AArch64 update to LLVM 18 (#2298)
* Run clang-format

* Remove arm.h header from AArch64 files

* Update all AArch64 module files to LLVM-18.

* Add check if the differs save file is up-to-date with the current files.

* Add new generator for MC test trnaslation.

* Fix warnings

* Update generated AsmWriter files

* Remove unused variable

* Change MCPhysReg type to int16_t as LLVM 18 dictates.

With LLVM 18 the MCPhysReg value's type is changed to int16_t.
If we update modules to LLVM 18, they will generate
compiler warnings that uint16_t* should not be casted to int16_t*.

This makes changing the all tables to int16_t necessary, because the alternative is
to duplicate all MCPhysReg related code. Which is even worse.

* Assign enum values to raw_struct member

* Add printAdrAdrpLabel def

* Add header to regression test files.

* Write files to build dir and ignore more parsing errors.

* Fix parsing of MC test files.

* Reset parser after every block

* Add write and patch header step.

* Add and update MC tests for AArch64

* Fix clang-tidy warnings

* Don't warn about padding issues.

They break automatically initialized structs we can not change easily.

* Fix: Incorrect access of LLVM instruction descriptions.

* Initialize DecoderComplete flag

* Add more mapping and flag details

* Add function to get MCInstDesc from table

* Fix incorrect memory operand access types.

* Fix test where memory was not written, ut only read.

* Attempt to fix Windows build

* Fix 2268

The enum values were different and hence lead to different decoding.

* Refactor SME operands.

- Splits SME operands in Matrix and Predicate operands.
- Fixes general problems of incorrect detections with
the vector select/index operands of predicate registers.
- Simplifies code.

* Fix up typo in WRITE

* Print actual path to struct fields

* Add Registers of SME operands to the reg-read list

* Add tests for SME operands.

* Use Capstone reg enum for comparison

* Fix tests: 'Vector arra...' to 'operands[x].vas'

* Add the developer fuzz option.

* Fix Python bindings for SME operands

* Fix variable shadowing.

* Fix clang-tidy warnings

* Add missing break.

* Fix varg usage

* Brackets for case

* Handle AArch64_OP_GROUP_AdrAdrpLabel

* Fix endian issue with fuzzing start bytes

* Move previous sme.pred to it's own operand type.

* Fix calculation for imm ranges

* Print list member flag

* Fix up operand strings for cstest

* Do only a shallow clone of the cmocka stable branch

* Fix: Don't categorize ZT0 as a SME matrix operand.

* Remove unused code.

* Add flag to distinguish Vn and Qn registers.

* Add all registers to detail struct, even if emitted in the asm text

* Fix: Increment op count after each list member is added.

* Remove implicit write to NZCV for MSR Imm instructions.

* Handle several alias operands.

* Add details for zero alias with za0.h

* Add SME tile to write list if written

* Add write access flags to operands which are zeroed.

* Add SME tests of #2285

* Fix tests with latest syntax changes.

* Fix segfault if memory operand is only a label without register.

* Fix python bindings

* Attempt to fix clang-tidy warning for some configurations.

* Add missing test file (accidentially blocked by gitignore.)

* Print clang-tidy version before linting.

* Update differ save file

* Formatting

* Use clang-tidy-15 as if possible.

* Remove search patterns for MC tests, since they need to be reworked anyways.

* Enum to upper case change

* Add information to read the OSS fuzz result.

* Fix special case of SVE2 operands.

Apparently ZT0 registers can an index attached,
get which is BOUND to it. We have no "index for reg" field.
So it is simply saved as an immediate.

* Handle LLVM expressions without asserts.

* Ensure choices are always saved.

* OP_GROUP enums can't be all upper case because they contain type information.

* Fix compatibility header patching

* Update saved_choices.json

* Allow mode == None in test_corpus
2024-07-08 10:28:54 +08:00
..
capstone AArch64 update to LLVM 18 (#2298) 2024-07-08 10:28:54 +08:00
prebuilt Add ability to copy prebuilt libraries from prebuilt directory during python build 2017-03-04 17:09:07 -08:00
pyx fix typos (#2346) 2024-05-12 21:17:20 +08:00
.gitignore Python: Make cython work with extreme prejudice 2016-10-25 21:49:58 -07:00
build_wheel.sh Bumb manylinux version to 2014 (x86) and 2_28 (x86_64) repectivly. 2023-07-19 11:13:25 -05:00
BUILDING.txt Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
LICENSE.TXT python: add LICENSE & PKG-INFO for Python module 2015-01-30 14:45:58 +08:00
Makefile Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
MANIFEST.in Python: Clean up the capstone-windows stuff with extreme prejudice 2016-10-25 21:48:41 -07:00
README.txt Architecture updater (auto-sync) - Updating AArch64 (#2026) 2023-11-15 12:12:14 +08:00
setup.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
setup_cython.py Add HPPA(PA-RISC) architecture (#2265) 2024-03-26 13:58:56 +08:00
test_aarch64.py AArch64 update to LLVM 18 (#2298) 2024-07-08 10:28:54 +08:00
test_all.py Use python3 as default interpreter for all python scripts (#2390) 2024-06-19 18:52:51 +08:00
test_alpha.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_arm.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_basic.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_bpf.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_customized_mnem.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_detail.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_evm.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_hppa.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_iter.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_lite.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_m68k.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_m680x.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_mips.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_mos65xx.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_ppc.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_riscv.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_sh.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_skipdata.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_sparc.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_systemz.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_tms320c64x.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_tricore.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_wasm.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_x86.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
test_xcore.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00
xprint.py Python2 leftovers v2 (#2395) 2024-07-01 14:10:12 +08:00

To install Capstone, you should run `pip install capstone`.

If you would like to build Capstone with just the source distribution, without
pip, just run `python setup.py install` in the folder with setup.py in it.

In order to use this source distribution, you will need an environment that can
compile C code. On Linux, this is usually easy, but on Windows, this involves
installing Visual Studio and using the "Developer Command Prompt" to perform the
installation. See BUILDING.txt for more information.

By default, attempting to install the python bindings will trigger a build of
the capstone native core. If this is undesirable for whatever reason, for
instance, you already have a globally installed copy of libcapstone, you may
inhibit the build by setting the environment variable LIBCAPSTONE_PATH. The
exact value is not checked, just setting it will inhibit the build. During
execution, this variable may be set to the path of a directory containing a
specific version of libcapstone you would like to use.

If you don't want to build your own copy of Capstone, you can use a precompiled
binary distribution from PyPI. Saying `pip install capstone` should
automatically obtain an appropriate copy for your system. If it does not, please
open an issue at https://github.com/capstone-engine/capstone.

--------------------------------------------------------------------------------

Capstone is a disassembly framework with the target of becoming the ultimate
disasm engine for binary analysis and reversing in the security community.

Created by Nguyen Anh Quynh, then developed and maintained by a small community,
Capstone offers some unparalleled features:

- Support multiple hardware architectures: ARM, AARCH64 (ARMv8), Mips, PPC, Sparc,
  SystemZ, XCore and X86 (including X86_64).

- Having clean/simple/lightweight/intuitive architecture-neutral API.

- Provide details on disassembled instruction (called “decomposer” by others).

- Provide semantics of the disassembled instruction, such as list of implicit
  registers read & written.

- Implemented in pure C language, with lightweight wrappers for C++, C#, Go,
  Java, NodeJS, Ocaml, Python, Ruby & Vala ready (available in main code,
  or provided externally by the community).

- Native support for all popular platforms: Windows, Mac OSX, iOS, Android,
  Linux, *BSD, Solaris, etc.

- Thread-safe by design.

- Special support for embedding into firmware or OS kernel.

- High performance & suitable for malware analysis (capable of handling various
  X86 malware tricks).

- Distributed under the open source BSD license.

Further information is available at http://www.capstone-engine.org


[License]

This project is released under the BSD license. If you redistribute the binary
or source code of Capstone, please attach file LICENSE.TXT with your products.