Merge branch 'dev' into uc-py-next

This commit is contained in:
Eli
2022-12-25 14:59:22 +02:00
committed by GitHub
60 changed files with 881 additions and 1264 deletions

View File

@@ -5,10 +5,15 @@ cd bindings/python
# Compile wheels
if [ -f /opt/python/cp36-cp36m/bin/python ];then
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel $@
else
python3 setup.py bdist_wheel
python3 setup.py bdist_wheel $@
fi
cd dist
auditwheel repair *.whl
mv -f wheelhouse/*.whl .
# We can't repair an aarch64 wheel on x64 hosts
# https://github.com/pypa/auditwheel/issues/244
if [[ ! "$*" =~ "aarch64" ]];then
auditwheel repair *.whl
mv -f wheelhouse/*.whl .
fi

3
bindings/python/sample_ctl.py Normal file → Executable file
View File

@@ -1,4 +1,5 @@
# Unicorn Emulator Engine
#!/usr/bin/env python
# Sample code for Unicorn.
# By Lazymio(@wtdcode), 2021
from unicorn import *

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python
# Sample code for S390x of Unicorn.
from unicorn import *
from unicorn.s390x_const import *

View File

@@ -29,7 +29,7 @@ SRC_DIR = os.path.join(ROOT_DIR, 'src')
UC_DIR = SRC_DIR if os.path.exists(SRC_DIR) else os.path.join(ROOT_DIR, '../..')
BUILD_DIR = os.path.join(UC_DIR, 'build_python')
VERSION = "2.0.0"
VERSION = "2.0.1.post1"
if SYSTEM == 'darwin':
LIBRARY_FILE = "libunicorn.2.dylib"
@@ -217,7 +217,7 @@ based on [QEMU](http://qemu.org).
Unicorn offers some unparalleled features:
- Multi-architecture: ARM, ARM64 (ARMv8), M68K, MIPS, PowerPC, SPARC and X86 (16, 32, 64-bit)
- Multi-architecture: ARM, ARM64 (ARMv8), M68K, MIPS, PowerPC, RISCV, SPARC, S390X, TriCore and X86 (16, 32, 64-bit)
- Clean/simple/lightweight/intuitive architecture-neutral API
- Implemented in pure C language, with bindings for Crystal, Clojure, Visual Basic, Perl, Rust, Ruby, Python, Java, .NET, Go, Delphi/Free Pascal, Haskell, Pharo, and Lua.
- Native support for Windows & *nix (with Mac OSX, Linux, *BSD & Solaris confirmed)

View File

@@ -1,6 +1,6 @@
# New and improved Unicorn Python bindings by elicn
# based on Nguyen Anh Quynnh's work
from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const
from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const, riscv_const
from .unicorn_const import *
from .unicorn import Uc, ucsubclass, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__

View File

@@ -311,7 +311,11 @@ UC_ARM64_REG_VBAR_EL1 = 287
UC_ARM64_REG_VBAR_EL2 = 288
UC_ARM64_REG_VBAR_EL3 = 289
UC_ARM64_REG_CP_REG = 290
UC_ARM64_REG_ENDING = 291
# floating point control and status registers
UC_ARM64_REG_FPCR = 291
UC_ARM64_REG_FPSR = 292
UC_ARM64_REG_ENDING = 293
# alias registers
UC_ARM64_REG_IP0 = 215

View File

@@ -2,14 +2,12 @@
UC_API_MAJOR = 2
UC_API_MINOR = 0
UC_API_PATCH = 0
UC_API_PATCH = 1
UC_API_EXTRA = 255
UC_VERSION_MAJOR = 2
UC_VERSION_MINOR = 0
UC_VERSION_PATCH = 0
UC_VERSION_PATCH = 1
UC_VERSION_EXTRA = 255
UC_SECOND_SCALE = 1000000
UC_MILISECOND_SCALE = 1000