mio
9de80cb625
Correct calling convention
2023-06-10 15:03:59 +02:00
mio
3d5b2643f0
Support demand paging via closures and seh
...
Reverts 12a79192ee
which exploits normal tcg mechanism
This uses a trampoline to pass extra data to seh handlers
2023-06-10 14:04:56 +02:00
Takacs, Philipp
fa457a3a97
fix UC_MEM_WRITE_PROT callback
...
callbacks work on the physical address.
2023-05-22 15:38:37 +02:00
mio
994813a0e5
Also check cpu->stopped
2023-05-19 23:24:42 +02:00
Takacs, Philipp
4a7b3b7a3a
fixup! load_helper only call cpu_loop_exit() when emulation is running
2023-05-12 12:36:16 +02:00
Takacs, Philipp
073c4b74ca
load_helper only call cpu_loop_exit() when emulation is running
...
The load_helper is sometimes called from register writes. When the load
fails check if emulation is running before jump out of the emulated code.
2023-05-09 14:58:40 +02:00
Mio
bbbc7856ac
Invalidate tb cache once mapping is removed
2023-04-12 20:56:54 +08:00
Takacs, Philipp
4b327baaf7
make unicorn use the physical addresses
...
This allows to emulate code witch fully uses the MMU. This is necesary
to allow full system emulation.
2023-03-28 13:50:11 +02:00
Nguyen Anh Quynh
eb118528b1
rename memory_mapping() to find_memory_region() and simplify mem_map()
2023-02-06 17:59:16 +08:00
mio
a25adf84f0
Rename flags to avoid confusion
2023-01-28 22:18:39 +01:00
mio
12a79192ee
Demand paging on Windows
2023-01-28 22:04:43 +01:00
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
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
lazymio
fdd129fd30
Remember the regions a hook has intrumented and clear cache on deletion
2022-06-02 14:46:02 +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
lazymio
4e22744679
Support flushing translation blocks and flush when we don't need count hook
2022-04-26 01:17:58 +02:00
lazymio
7e6d21d27c
Fix memory leak in code_gen_buffer
2022-04-03 21:44:09 +02:00
lazymio
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
lazymio
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
lazymio
be7fbf1306
Handle CPU fault when invalidating TB cache
2022-01-08 22:10:17 +01:00
lazymio
c733bbada3
Fix wrong offset used in split_region
2021-11-23 23:22:53 +01:00
lazymio
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
lazymio
87a391d549
Inline uc_tracecode when there is only exactly one hook
2021-11-21 16:44:39 +01:00
lazymio
247ffbe0e8
Support nested uc_emu_start calls
2021-11-16 21:07:03 +01:00
lazymio
43c643d4af
Fix #1488
2021-11-16 09:41:21 +01:00
lazymio
7e244f87b4
Fix UC_HOOK_EDGE_GENERATED implementation
2021-11-11 22:15:15 +01:00
lazymio
94a82ed94d
Ensure JIT protection is disabled when generating TB
2021-11-07 20:23:25 +01:00
lazymio
67e2386da6
Add test and close #1477
2021-11-03 21:40:13 +01:00
lazymio
eb75d459f0
Add a regression test for invalidating empty TB and have a better solution
2021-11-03 01:07:06 +01:00
lazymio
c11b9aa5c3
Add a new hook type UC_HOOK_EDGE_GENERATED and corresponding sample
2021-11-01 23:27:35 +01:00
lazymio
b7e82d460c
Expose more TB related stuff
2021-11-01 22:11:43 +01:00
lazymio
0a3e46bf4f
Format
2021-11-01 09:41:25 +01:00
lazymio
3dd2e0f95d
Basic implementation of uc_ctl
2021-11-01 00:39:36 +01:00
lazymio
84abf1d3a4
A stronger test and handle addr_end = 0
2021-10-31 21:01:55 +01:00
lazymio
4bcf1c4a7c
Flush TB at exit with a better approach instead of flushing tlb in uc1
2021-10-31 19:43:56 +01:00
lazymio
e695686c15
Remove AFL Integration by reverting
2021-10-26 11:22:21 +02:00
lazymio
7ac7c23c12
Fix Windows build for AFL integration
2021-10-25 16:11:58 +02:00
lazymio
1fa2eb688b
Fix UC_MODE_AFL and update config
2021-10-25 14:39:40 +02:00
lazymio
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