Commit Graph

172 Commits

Author SHA1 Message Date
Takacs, Philipp
e25419bb2d add virtuall tlb
this virtuall tlb allows to use mmu indipendent of the architectur
2023-03-28 13:50:11 +02:00
Takacs, Philipp
759d694e24 sample to use the softmmu 2023-03-28 13:50:11 +02:00
Nguyen Anh Quynh
66adfff20d samples: fix a typo 2022-10-12 14:39:10 +08:00
Mio
a0e119c6f0
Format code 2022-08-31 23:27:24 +08:00
relapids
7430e249ea Fix for incorrect argument types passed to uc_ctl_request_cache/uc_ctl_remove_cache in test_uc_ctl_tb_cache. 2022-08-15 05:55:25 -07:00
Nguyen Anh Quynh
088ff9add7 samples: cleanup sample_tricore.c 2022-04-30 10:16:48 +08:00
Eric Poole
cfee2139a0
TriCore Support (#1568)
* TriCore Support

python sample

* Update sample_tricore.py

Correct attribution

* Update sample_tricore.py

Fixed byte code to execute properly.

* Update sample_tricore.py

Removed testing artifact

* Added tricore msvc config-file.h

* Added STATIC to tricore config and added helper methods to symbol file generation.

* Update op_helper.c

Use built in crc32

* Fix tricore samples and small code blocks are now handled properly

* Add CPU types

* Generate bindings

* Format code

Co-authored-by: lazymio <mio@lazym.io>
2022-04-29 23:11:34 +02:00
lazymio
7f8ff1af6a
Update sample for MRS hook 2022-02-27 15:28:32 +01:00
lazymio
3e6665db00
Implement coprocessor register read/write for arm64 2022-02-11 22:13:01 +01:00
lazymio
8bc1489210
Implement coprocessor register read/write for arm 2022-02-11 21:45:37 +01:00
mio
034a1aa5f2
Make s390x stopping mechanism work 2021-12-27 23:48:20 +01:00
mio
faa689c0f0
Merge systemz to the latest uc2 codebase 2021-12-26 22:58:32 +01:00
Nguyen Anh Quynh
b042a6a01d add missing files 2021-12-06 04:28:13 +08:00
lazymio
c05fbb7e63
Add a handy example to show how to handle invalid memory read/write 2021-11-16 23:15:38 +01:00
lazymio
35017a614f
Slightly change UC_CTL_TB_REMOVE_CACHE 2021-11-08 22:09:33 +01:00
lazymio
e836b62e01
Minor fix for uc_ctl 2021-11-08 20:40:02 +01:00
lazymio
96fc0bf6bc
Fix typo in sample 2021-11-04 21:10:31 +01:00
lazymio
937445466b
Update samples to show the use of uc_ctl 2021-11-04 18:41:45 +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
cee44b0464
Add tests and samples to show how to control TB cache 2021-11-01 14:46:01 +01:00
lazymio
fb45b287ba
Add multiple exits mechanism and tests&samples 2021-11-01 14:00:43 +01:00
lazymio
fe3b798ba7
Remove unused args 2021-11-01 11:02:31 +01:00
lazymio
c60825bf6e
Remove unused args 2021-11-01 10:22:30 +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
47113d5a83
Format 2021-10-31 10:42:07 +01:00
lazymio
e62b0ef255
Add clang-format and format code to qemu code style 2021-10-29 12:44:49 +02:00
Nguyen Anh Quynh
aaaea14214 import Unicorn2 2021-10-03 22:14:44 +08:00
lazymio
225d387325
Fix wrong sync after UC_ERR_[READ, WRITE, FETCH]_[UNMAPPED, PROT] (#1368)
* Fix wrong sync after UC_ERR_[READ, WRITE, FETCH]_[UNMAPPED, PROT]

Note that:
1. We only guarantee the pc (and other internal states) is correct
if and only of `uc_emu_start` returns without any error (or errors
have been handled in callbacks.).
2. If memory read/write error isn't handled by hooks, the state is
undefined and the pc is probably wrong if no hook is installed.

This fixes #1323.

* Rename variables

* Add note in unicorn.h

* Refine test_i386_invalid_mem_read_in_tb
2021-05-12 00:10:45 +08:00
lazymio
f1f59bac55
The UC instance must be created twice to reproduce the problem (#1382)
* The UC instance must be created twice to reproduce the problem

* Fix coding style
2021-04-10 03:30:24 +08:00
lazymio
bf1713d9e0
Add arm ite blocks samples from #853 (#1381) 2021-03-30 12:06:26 +08:00
Nguyen Anh Quynh
95e539f3e6 samples: make sample_x86.c to use uc_context_free() to free context (instead of uc_free()) 2020-09-24 22:37:01 +08:00
Nguyen Anh Quynh
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
Dominik Maier
9fedbd96f4
fixed leaks in test cases (#1247) 2020-05-02 18:18:18 +08:00
ζeh Matt
3a3bc0c22d Timeout error (#1173)
* Implement timeout state and new error for such case

* Adjust test_i386_loop sample

* Adjust test_i386_loop test
2019-12-29 00:16:54 +08:00
Catena cyber
feb46abb4a Fuzz (#1000)
* Integration with oss-fuzz

* Use CFLAGS even for linking

as for fuzzing with asan

* Do not abort on uc_emu_start error

* Redirect fuzz output somewhere else than stdout

* Use uc_open for every fuzz instance

* Avoids timeouts from infinite loops

Limiting the number of instructions

* Moving fuzz to tests directory
2018-08-29 10:36:23 +08:00
RLib
f0229bd144 Fixed register mistake in comments (#894) 2017-09-17 16:40:01 +07:00
Nguyen Anh Quynh
8f2d6cd70f samples: comment out test_i386_invalid_c6c7() 2017-06-14 16:14:36 +07:00
vardyh
944658e920 samples::x86: introduce C6/C7 validation testcase
Signed-off-by: vardyh <vardyh.dev@gmail.com>
2017-05-25 17:55:40 +08:00
zhangwm
4a62409949 arm64eb: arm64 big endian also using little endian instructions. (#816)
* arm64eb: arm64 big endian also using little endian instructions.

* arm64: using another example that depends on endians.

example:
1. store a word: 0x12345678
2. load a byte:
   * little endian : 0x78
   * big endian    : 0x12
2017-05-04 20:00:48 +08:00
xorstream
fa45a42c76 Removed MSVC binding. (#808) 2017-04-27 10:21:04 +08:00
xorstream
1940bc7032 Added arm64eb sample to sample_all.sh script (#809) 2017-04-25 13:42:13 +08:00
Nguyen Anh Quynh
2bd40b9c91 update armeb & arm64eb samples 2017-04-25 12:55:26 +08:00
zhangwm
2e973a13f0 arm64eb: add support for ARM64 big endian. 2017-04-24 23:30:01 +08:00
xorstream
d167f1a27a Added armbe support to MSVC branch. (#801) 2017-04-21 15:26:21 +08:00
Nguyen Anh Quynh
e917c9de10 Merge branch 'master' into msvc2 2017-04-21 01:17:00 +08:00
Elias Bachaalany
d10737c9f8 Added .gitignore for VS 2015 (#794) 2017-04-12 08:50:02 +08:00
Nguyen Anh Quynh
094ca80092 fix conflicts 2017-03-30 12:23:24 +08:00
Nguyen Anh Quynh
b9712f0a5d add sample_armeb to sample_all.sh 2017-03-18 16:30:44 +08:00