Skip to content

Commit 241a391

Browse files
committedNov 1, 2022
Merge branch 'dev'
2 parents 3c53a64 + db9ddab commit 241a391

File tree

10 files changed

+23
-34
lines changed

10 files changed

+23
-34
lines changed
 

‎Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "unicorn-engine"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
authors = ["Ziqiao Kong", "Lukas Seidel"]
55
documentation = "https://github.com/unicorn-engine/unicorn/wiki"
66
edition = "2021"

‎bindings/dotnet/UnicornManaged/Const/Common.fs

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ module Common =
99
let UC_API_MAJOR = 2
1010

1111
let UC_API_MINOR = 0
12-
13-
let UC_API_PATCH = 0
12+
let UC_API_PATCH = 1
1413
let UC_API_EXTRA = 255
1514
let UC_VERSION_MAJOR = 2
1615

1716
let UC_VERSION_MINOR = 0
18-
19-
let UC_VERSION_PATCH = 0
17+
let UC_VERSION_PATCH = 1
2018
let UC_VERSION_EXTRA = 255
2119
let UC_SECOND_SCALE = 1000000
2220
let UC_MILISECOND_SCALE = 1000

‎bindings/go/unicorn/unicorn_const.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ const (
44
API_MAJOR = 2
55

66
API_MINOR = 0
7-
8-
API_PATCH = 0
7+
API_PATCH = 1
98
API_EXTRA = 255
109
VERSION_MAJOR = 2
1110

1211
VERSION_MINOR = 0
13-
14-
VERSION_PATCH = 0
12+
VERSION_PATCH = 1
1513
VERSION_EXTRA = 255
1614
SECOND_SCALE = 1000000
1715
MILISECOND_SCALE = 1000

‎bindings/java/unicorn/UnicornConst.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ public interface UnicornConst {
66
public static final int UC_API_MAJOR = 2;
77

88
public static final int UC_API_MINOR = 0;
9-
10-
public static final int UC_API_PATCH = 0;
9+
public static final int UC_API_PATCH = 1;
1110
public static final int UC_API_EXTRA = 255;
1211
public static final int UC_VERSION_MAJOR = 2;
1312

1413
public static final int UC_VERSION_MINOR = 0;
15-
16-
public static final int UC_VERSION_PATCH = 0;
14+
public static final int UC_VERSION_PATCH = 1;
1715
public static final int UC_VERSION_EXTRA = 255;
1816
public static final int UC_SECOND_SCALE = 1000000;
1917
public static final int UC_MILISECOND_SCALE = 1000;

‎bindings/pascal/unicorn/UnicornConst.pas

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ interface
77
const UC_API_MAJOR = 2;
88

99
UC_API_MINOR = 0;
10-
11-
UC_API_PATCH = 0;
10+
UC_API_PATCH = 1;
1211
UC_API_EXTRA = 255;
1312
UC_VERSION_MAJOR = 2;
1413

1514
UC_VERSION_MINOR = 0;
16-
17-
UC_VERSION_PATCH = 0;
15+
UC_VERSION_PATCH = 1;
1816
UC_VERSION_EXTRA = 255;
1917
UC_SECOND_SCALE = 1000000;
2018
UC_MILISECOND_SCALE = 1000;

‎bindings/python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
UC_DIR = SRC_DIR if os.path.exists(SRC_DIR) else os.path.join(ROOT_DIR, '../..')
3030
BUILD_DIR = os.path.join(UC_DIR, 'build_python')
3131

32-
VERSION = "2.0.0"
32+
VERSION = "2.0.1"
3333

3434
if SYSTEM == 'darwin':
3535
LIBRARY_FILE = "libunicorn.2.dylib"

‎bindings/python/unicorn/unicorn_const.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
UC_API_MAJOR = 2
33

44
UC_API_MINOR = 0
5-
6-
UC_API_PATCH = 0
5+
UC_API_PATCH = 1
76
UC_API_EXTRA = 255
87
UC_VERSION_MAJOR = 2
98

109
UC_VERSION_MINOR = 0
11-
12-
UC_VERSION_PATCH = 0
10+
UC_VERSION_PATCH = 1
1311
UC_VERSION_EXTRA = 255
1412
UC_SECOND_SCALE = 1000000
1513
UC_MILISECOND_SCALE = 1000

‎bindings/ruby/unicorn_gem/lib/unicorn_engine/unicorn_const.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ module UnicornEngine
44
UC_API_MAJOR = 2
55

66
UC_API_MINOR = 0
7-
8-
UC_API_PATCH = 0
7+
UC_API_PATCH = 1
98
UC_API_EXTRA = 255
109
UC_VERSION_MAJOR = 2
1110

1211
UC_VERSION_MINOR = 0
13-
14-
UC_VERSION_PATCH = 0
12+
UC_VERSION_PATCH = 1
1513
UC_VERSION_EXTRA = 255
1614
UC_SECOND_SCALE = 1000000
1715
UC_MILISECOND_SCALE = 1000

‎docs/FAQ.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Optimize your program with less instrumentation, e.g. by using `UC_HOOK_BLOCK` i
99

1010
## Why do I get a wrong PC after emulation stops?
1111

12-
Updating PC is a very large overhead (10x slower in the worst case, see FAQ above) for emulation so the PC sync guarantee is explained below:
12+
Updating PC is a very large overhead (10x slower in the worst case, see FAQ above) for emulation so the PC sync guarantee is explained below in several cases:
1313

14-
- A `UC_HOOK_CODE` is installed. In this case, the PC is sync-ed _everywhere_ within the effective range of the hook. However, on some architectures, the PC might by sync-ed all the time if the hook is installed.
15-
- A `UC_HOOK_MEM_READ` or `UC_HOOK_MEM_WRITE` is installed. In this case, the PC is sync-ed exactly before any read/write events within the effective range of the hook.
14+
- A `UC_HOOK_CODE` hook is installed. In this case, the PC is sync-ed _everywhere_ within the effective range of the hook. However, on some architectures, the PC might by sync-ed all the time if the hook is installed in any range. Note using `count` in `uc_emu_start` implies installing a `UC_HOOK_CODE` hook.
15+
- A `UC_HOOK_MEM_READ` or `UC_HOOK_MEM_WRITE` hook is installed. In this case, the PC is sync-ed exactly before any read/write events within the effective range of the hook.
1616
- Emulation (`uc_emu_start`) terminates without any exception. In this case, the PC will point to the next instruction.
1717
- No hook mentioned above is installed and emulation terminates with exceptions. In this case, the PC is sync-ed at the basic block boundary, in other words, the first instruction of the basic block where the exception happens.
1818

@@ -44,12 +44,13 @@ Currently, only a small subset of the instructions can be instrumented.
4444

4545
On x86, all available instructions are: `in` `out` `syscall` `sysenter` `cpuid`.
4646

47-
## Emulating some instructions gives an error, what should I do?
47+
## Emulating some instructions gives an error like "Invalid Instruction", what should I do?
4848

4949
1. Some instructions are not enabled by default on some architectures. For example, you have to setup CSR on RISC-V or VFP on ARM before emulating floating-point instructions. Refer to the corresponding manual to check if you leave out possible switches in special registers.
50-
2. If you are on ARM, please check whether you are emulating a THUMB instruction. If so, please use `UC_MODE_THUMB` and make sure the starting address is odd.
51-
3. If either is not the case, it might be some newer instruction sets that qemu5 doesn’t support.
52-
4. Note some instruction sets are not implemented by QEMU.
50+
2. Different CPU models support different sets of instructions. This is especially observed on ARM CPUs. For example, for `THUMB2` big-endian instructions, consider setting CPU model to `cortex-r5` or `arm_max`. See [#1725](https://github.com/unicorn-engine/unicorn/issues/1725) and [#1724](https://github.com/unicorn-engine/unicorn/issues/1724).
51+
3. If you are on ARM, please check whether you are emulating a THUMB instruction. If so, please use `UC_MODE_THUMB` and make sure the starting address is odd.
52+
4. If it's not the cases above, it might be some newer instruction sets that qemu5 doesn’t support.
53+
5. Note some instruction sets are not implemented by the latest QEMU.
5354

5455
If you are still using Unicorn1, please upgrade to Unicorn2 for better support.
5556

‎include/unicorn/unicorn.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ typedef size_t uc_hook;
7272
// Unicorn API version
7373
#define UC_API_MAJOR 2
7474
#define UC_API_MINOR 0
75-
#define UC_API_PATCH 0
75+
#define UC_API_PATCH 1
7676
// Release candidate version, 255 means the official release.
7777
#define UC_API_EXTRA 255
7878

0 commit comments

Comments
 (0)
Please sign in to comment.