Commit Graph

151 Commits

Author SHA1 Message Date
94d952b410 Add depreciated in unicorn.h 2021-11-04 18:44:56 +01:00
dfbffa44ec Support changing cpu model for ARM 2021-11-04 18:37:10 +01:00
6b5529fcb7 Merge pull request #1458 from bet4it/patch
Port some patches from Unicorn1 to Unicorn2
2021-11-03 20:59:42 +01:00
9818840f4e Add tests for UC_HOOK_TCG_OPCODE 2021-11-03 20:56:45 +01:00
bcf85be86d Add a new hook type UC_HOOK_TCG_OPCODE 2021-11-03 01:46:24 +01:00
aaf340d9e4 Merge branch 'dev' into patch 2021-11-02 18:36:22 +08: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
3dd2e0f95d Basic implementation of uc_ctl 2021-11-01 00:39:36 +01: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
e62b0ef255 Add clang-format and format code to qemu code style 2021-10-29 12:44:49 +02:00
e695686c15 Remove AFL Integration by reverting 2021-10-26 11:22:21 +02:00
dd7476a9bd Initial import unicornafl 2021-10-25 00:51:16 +02:00
00b4a17c1b Fix some typos in include files (#1350) 2021-10-11 11:18:27 +08:00
mio
4c438e7774 Update comments for UC_HOOK_INSN 2021-10-05 18:15:31 +02: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
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
21ec6e8f83 Add ARM BE8 support (#1369)
Co-authored-by: w4kfu <gw4kfu@gmail.com>
2021-03-31 21:22:35 +08:00
770d5679c3 Fix some typos in include files (#1350) 2020-10-29 11:16:45 +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
3a2ad04f2b refine comments on UC_QUERY_TIMEOUT 2020-05-24 23:56:35 +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
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
ba74552199 Expose different 32-bit ARM CPU models to users via UC_MODE flags (#1165) 2019-10-26 05:01:00 +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
e6c27cfbd5 LGPL2 for all header files under include/unicorn/ 2017-12-16 10:08:42 +08:00
3fdb2d2442 add architecture query (#842) 2017-05-21 09:47:02 +08:00
14222bd5f0 Update UC_HOOK_MEM_VALID (#837)
* Update UC_HOOK_MEM_VALID

UC_HOOK_MEM_READ fires before handlers for invalid memory reads, so UC_HOOK_MEM_VALID would technically also be receiving invalid memory reads. Switching to UC_HOOK_MEM_READ_AFTER ensures that only actually valid reads are hooked

* Removed macro change, added comment

Removed the macro change, but added a clarifying comment. May submit a future PR with a new macro added

* Update unicorn.h

will -> may

* Update unicorn.h
2017-05-18 08:12:46 +07:00
476553223b Fixing issues with const_generator.py (#832) 2017-05-14 00:16:48 +07:00
e95edd37f3 Update unicorn.h (#821)
Further clarifying the comments I PRed last week.
2017-05-06 22:32:00 +08:00
c09a52e803 Update comments on UC_MEM_*_UNMAPPED (#811)
Updated the comment on UC_MEM_*_UNMAPPED to clarify what happens if "true" is returned
2017-04-27 09:29:01 +08:00
f6908f03a9 Updated uc_close comment to clarify usage (#805) 2017-04-24 23:55:18 +08:00
dd07ae607c bump extra version to 2 2017-04-21 15:30:40 +08:00
e917c9de10 Merge branch 'master' into msvc2 2017-04-21 01:17:00 +08:00
5dbc640b9a bump UC_VERSION_EXTRA to 1 2017-04-20 14:14:24 +08:00
6ea39f7d5a merge msvc with master 2017-02-24 10:39:36 +08:00
fG!
d5870ff47d Update unicorn.h (#753)
Make it clear that only very few instructions can be hooked
2017-02-21 10:22:17 +08:00
2a941e3efb Finalise MSVC port (#739)
* Fix for MIPS issue.

* Sparc support added.

* M68K support added.

* Arm support ported.

* Fix issue with VS2015 shlobj.h file

* Arm issue fix.

* Finalise MSVC port.
2017-01-24 22:09:33 +08:00
e98a396e68 fix include path of platform.h 2017-01-21 11:31:29 +08:00
fac6a66860 platform.h move #3 2017-01-21 00:13:21 +11:00
1fea4e6d87 Some small changes to clean up before pull request. 2017-01-20 22:34:14 +11:00
92392e0f57 Merge with current master. 2017-01-20 18:22:28 +11:00
ec6602a7e1 fixed documentation of uc_emu_stop (#721) 2017-01-20 06:19:43 +08:00
1aeaf5c40d This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
bc569f5a54 rename API uc_mem_free() to uc_free(). see #662 2017-01-10 20:59:14 +08:00
fdbbdc6216 rename uc_context_free() to uc_mem_free(). see #373 2017-01-09 20:52:14 +08:00
7a1930a879 add UC_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:37:47 +08:00
4083b87032 add new hook type UC_HOOK_MEM_READ_AFTER, adapted from PR #399 by @farmdve. updated all bindings, except Ruby & Haskell 2016-10-22 11:19:55 +08:00