Commit Graph

146 Commits

Author SHA1 Message Date
06be6fdc24 Merge pull request #1537 from gerph/clear-pending-hook-exception-before-emulation
Clear Python pending hook exception before we enter the emulation.
2022-01-15 22:13:24 +01:00
dfb0446137 Update bindings 2022-01-15 20:56:24 +01:00
1ba59ed70a Clear Python pending hook exception before we enter the emulation.
The pending exception hook is set when the hook raised an exception
and wants to report it outside the emulation loop. However, it is
never cleared back to None. This means that after an exception is
raised in a hook, all subsequent execution (even if successful) will
raise the exception.

This change clears the exception before we start another emulation,
which should ensure that if we have _hook_exception set, it really
is from hooks in this emulation run.
2022-01-15 17:45:45 +00:00
c671efe798 Update bindings 2022-01-05 22:00:59 +01:00
c4b4189857 Update bindings 2022-01-04 21:12:52 +01:00
3184d3fcdf Update python bindings 2021-12-22 20:46:14 +01:00
9abbba173c Update python bindings 2021-11-07 21:00:05 +01:00
923b4ad3cc Update python bindings 2021-11-04 21:47:30 +01:00
b9c0066a47 Format and naming 2021-11-04 20:04:57 +01:00
db90f39ac6 Generate bindings 2021-11-04 20:01:19 +01:00
aaf340d9e4 Merge branch 'dev' into patch 2021-11-02 18:36:22 +08:00
090686f8ed uc_ctl proposal (#1473)
* Add uc_ctl

* Add comments

* Slightly changed for bindings generation

* Generate bindings
2021-10-30 10:45:32 +08:00
e695686c15 Remove AFL Integration by reverting 2021-10-26 11:22:21 +02:00
17963ff4aa Update python bindings for afl 2021-10-25 01:27:51 +02:00
f08b7d6b5b Make gen_const work and updates constants 2021-10-25 00:57:32 +02:00
47ecfc1b2c Handle exceptions raised in Python hook functions (#1387) 2021-10-12 08:35:52 +08:00
mio
59deed7484 Simply the setup.py 2021-10-05 14:46:04 +02:00
e8bd7ca087 bindings: update X86 register constants 2021-10-04 19:41:41 +08:00
aaaea14214 import Unicorn2 2021-10-03 22:14:44 +08:00
2874435d2f bump version to 1.0.3 2021-05-16 21:38:08 +08:00
4f9a6cfcf3 Handle exceptions raised in Python hook functions (#1387) 2021-04-26 00:35:56 +08:00
21ec6e8f83 Add ARM BE8 support (#1369)
Co-authored-by: w4kfu <gw4kfu@gmail.com>
2021-03-31 21:22:35 +08:00
1044403d38 Implement uc_context_free (#1336)
* Implement uc_context_free

* Use uc_context_free for python bindings

* Format code

* Simplify code

* Move next,context inside while loop

* Add my name to CREDITS.TXT
2020-09-24 22:28:55 +08:00
4441394258 Fix context saving (#1335)
* Fix context size

* Make UcContext convertible to bytes and picklable

Fix when updaing context

* Test context pickling

* Fix double free when the context is pickled from bytes
2020-09-24 00:53:23 +08:00
2e0f753e6f save cpu->jmp_env in saving context, so uc_emu_start() can be reentrant. also improved Python binding on handling context 2020-06-05 20:12:44 +08:00
fbef45b18f remove UC_ERR_TIMEOUT, so timeout on uc_emu_start() is not considered error. added UC_QUERY_TIMEOUT to query exit reason 2020-05-24 23:54:45 +08:00
cf3451c37a bindings: update ARM64 registers 2020-05-10 21:51:14 +08:00
625399774c X64 base regs (#1166)
* x86: setup FS & GS base

* Fixed base register writes for x64, removed then for x16/x32 (the don't exist there?)

* FS reg comes before GS so the base regs do so, too

* added shebang to const_generator.py

* Added base regs to and added 'all' support to const_generator

Co-authored-by: naq <aquynh@gmail.com>
2020-05-05 08:34:51 +08:00
b0d5837c61 bindings: add UC_ERR_TIMEOUT 2019-12-29 00:19:34 +08:00
naq
3b17db0d84 bindings: update after the last commit on adding ARM modes 2019-10-26 05:02:39 +08:00
07f94ad1fc Added an invalid instruction hook (#1132)
* first draft for an invalid instruction hook

* Fixed documentation on return value of invalid insn hook
2019-09-23 01:53:06 +08:00
8987ad0fff Handle serialization of cpu context save (#1129)
* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes

* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...
2019-09-07 19:09:17 +08:00
24f55a7973 Removed hardcoded CP0C3_ULRI (#1098)
* activate CP0C3_ULRI for CONFIG3, mips

* updated with mips patches

* updated with mips patches

* remove hardcoded config3

* git ignore vscode

* fix spacing issue and turn on floating point
2019-07-06 17:53:02 +08:00
55d8d073bd support for YMM registers ymm8-ymm15 (#1079) 2019-04-01 11:00:34 +08:00
07cafff76a bindings: update for latest ARM registers addition 2019-03-07 08:38:41 +08:00
6d47b38b7f bindings: update after recent addition of ARM_REG_IPSR 2019-02-28 09:56:29 +08:00
738d102989 bindings: add newly added register MXCSR 2019-02-15 13:01:27 +08:00
41cc047b87 bindings: update after #922 2017-12-20 22:13:29 +08:00
12642c2555 Cleanups/fixes for the library issue conglomerate (#897)
* Python: Disable distribution of static library on linux and macos; add environment variable LIBUNICORN_PATH to let user specify location of native library; prevent build of native library if this option is enabled; closes #869

* Python: Update README.TXT to describe how to manage the building and usage of the native library
2017-09-24 22:33:01 +08:00
b0b5f8442d python: Fix exception in finalizer at exit (#873)
Sometimes, the finalizer for an `UcRef` runs so late that the members of the
module have already been set to `None`. We need to make sure that we don't
depend on anything in the module, or we risk getting a Exception when we try
to access the `release_handle` method of `None` (`Uc`).
2017-09-15 22:21:25 +07:00
3fdb2d2442 add architecture query (#842) 2017-05-21 09:47:02 +08:00
014ccfb94a Aarch64 add thread registers (#834)
* add thread registers to AArch64

* update bindings to add AArch64 thread registers

* fix indentation for register read/write switch-case in unicorn_aarch64.c
2017-05-14 14:42:49 +07:00
5385baba39 Implemented read and write access to the YMM registers (#819) 2017-05-05 09:02:58 +08:00
187b470245 add arm64 CPACR_EL1 register support (#814) 2017-05-02 14:51:19 +08:00
2e973a13f0 arm64eb: add support for ARM64 big endian. 2017-04-24 23:30:01 +08:00
5dbc640b9a bump UC_VERSION_EXTRA to 1 2017-04-20 14:14:24 +08:00
7441cfe4e5 Update unicorn.py
space
2017-04-18 07:46:12 +08:00
4f07910eae handle not having a path (#798) 2017-04-18 07:44:48 +08:00
b3a5eae81c uc_reg_read & uc_reg_write now support ARM64 Neon registers (#774)
* uc_reg_read & uc_reg_write now support ARM64 Neon registers

* Do not reuse uc_x86_xmm for uc_arm64_neon128. TODO: refactor both classes to use the same parent.
2017-03-07 21:29:34 +08:00
f4325f8c4e bindings: update to support X86 MSR id 2017-02-24 21:51:01 +08:00