Commit Graph

35 Commits

Author SHA1 Message Date
Mio
092014a6cc Don't sync pc if user requests a restart 2022-08-31 23:27:05 +08: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
fdd129fd30 Remember the regions a hook has intrumented and clear cache on deletion 2022-06-02 14:46:02 +02:00
289034538d Cleaner implementation for uc_mem_prot on mmio regions 2022-05-28 23:46:06 +02:00
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
5d37e21db5 Don't call hooks if there is already an unhandled exception 2022-05-20 13:15:23 +02:00
4e22744679 Support flushing translation blocks and flush when we don't need count hook 2022-04-26 01:17:58 +02:00
7e6d21d27c Fix memory leak in code_gen_buffer 2022-04-03 21:44:09 +02:00
b7bc13650c Sync PC after we exit
We should sync PC if there is no UC_HOOK_CODE hook
2022-03-05 22:42:41 +01:00
Bet4
d96083d4d1 Fix pc after ppc sc inst 2022-02-20 20:42:46 +08:00
d0de673208 Fix the undefined lshift negative numbers 2022-02-12 17:47:57 +01:00
mio
28e791a37f Add debug tracing feature
It's disabled by default, use -DUNICORN_TRACER=on to enable it
2022-01-18 19:35:43 +01:00
be7fbf1306 Handle CPU fault when invalidating TB cache 2022-01-08 22:10:17 +01:00
c733bbada3 Fix wrong offset used in split_region 2021-11-23 23:22:53 +01:00
7a1de17f37 Fix UC_HOOK_EDGE_GENERATED to work with indirect jump
For an indirect jump (lookup_tb_ptr), last_tb would be NULL
2021-11-23 00:25:55 +01:00
87a391d549 Inline uc_tracecode when there is only exactly one hook 2021-11-21 16:44:39 +01:00
247ffbe0e8 Support nested uc_emu_start calls 2021-11-16 21:07:03 +01:00
43c643d4af Fix #1488 2021-11-16 09:41:21 +01:00
7e244f87b4 Fix UC_HOOK_EDGE_GENERATED implementation 2021-11-11 22:15:15 +01:00
94a82ed94d Ensure JIT protection is disabled when generating TB 2021-11-07 20:23:25 +01:00
67e2386da6 Add test and close #1477 2021-11-03 21:40:13 +01:00
eb75d459f0 Add a regression test for invalidating empty TB and have a better solution 2021-11-03 01:07:06 +01:00
c11b9aa5c3 Add a new hook type UC_HOOK_EDGE_GENERATED and corresponding sample 2021-11-01 23:27:35 +01:00
b7e82d460c Expose more TB related stuff 2021-11-01 22:11:43 +01:00
0a3e46bf4f Format 2021-11-01 09:41:25 +01:00
3dd2e0f95d Basic implementation of uc_ctl 2021-11-01 00:39:36 +01:00
84abf1d3a4 A stronger test and handle addr_end = 0 2021-10-31 21:01:55 +01:00
4bcf1c4a7c Flush TB at exit with a better approach instead of flushing tlb in uc1 2021-10-31 19:43:56 +01:00
e695686c15 Remove AFL Integration by reverting 2021-10-26 11:22:21 +02:00
7ac7c23c12 Fix Windows build for AFL integration 2021-10-25 16:11:58 +02:00
1fa2eb688b Fix UC_MODE_AFL and update config 2021-10-25 14:39:40 +02:00
dd7476a9bd Initial import unicornafl 2021-10-25 00:51:16 +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