Commit Graph

8 Commits

Author SHA1 Message Date
mio
3ea7857be3
Exit early when invalid read happens
In this way, the target register won't be overwritten
2022-10-20 21:57:28 +02:00
mio
2c00546c6e
Merge rhelmot's fix 2022-08-14 13:35:54 +02:00
mio
8303328aa8
Obtain memory mapping after hooks are called 2022-08-14 12:42:53 +02:00
lazymio
289034538d
Cleaner implementation for uc_mem_prot on mmio regions 2022-05-28 23:46:06 +02:00
lazymio
2a6529348c
Support uc_mem_protect on mmio regions
Also make mmio ranges return the correct errors on wrong protection
2022-05-28 23:33:43 +02:00
lazymio
5d37e21db5
Don't call hooks if there is already an unhandled exception 2022-05-20 13:15:23 +02:00
mio
ae1b6ad89b
Support building on Android arm aarch64 x86 x86_64
1. Add cmake support in CMakeLists.txt according to https://developer.android.com/ndk/guides/other_build_systems

2. Resolve symbols errors

3. Backport fixes from 438ed42311

   > QEMU relies on two optimization for ppc64 and arm:
   >
   > 1. if(0) /* optimized code */
   > 2. assert(0); /* optimized code */
   >
   > But the assert on mingw32 doesn't have noreturn attribute which prevents
   > the second optimization and some code is reverted to the original code
   > to fit in the first optimization.
   >
   > The assert implementation is copied from glib as qemu did.

   Unfortunately, NDK also doesn't have an assert implementation qemu prefers.
2021-10-06 04:42:44 +08:00
Nguyen Anh Quynh
aaaea14214 import Unicorn2 2021-10-03 22:14:44 +08:00