Skip to content

Commit 67f08b1

Browse files
committed
Bump version and generate bindings
1 parent 6c4a3fd commit 67f08b1

File tree

21 files changed

+220
-56
lines changed

21 files changed

+220
-56
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ endif()
5252
set(CMAKE_C_STANDARD 11)
5353

5454
set(UNICORN_VERSION_MAJOR 2)
55-
set(UNICORN_VERSION_MINOR 0)
56-
set(UNICORN_VERSION_PATCH 2)
55+
set(UNICORN_VERSION_MINOR 1)
56+
set(UNICORN_VERSION_PATCH 0)
5757

5858
include(cmake/bundle_static.cmake)
5959

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.2"
3+
version = "2.1.0"
44
authors = ["Ziqiao Kong", "Lukas Seidel"]
55
documentation = "https://github.com/unicorn-engine/unicorn/wiki"
66
edition = "2021"

bindings/dotnet/UnicornEngine/Const/Common.fs

+11-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ open System
77
[<AutoOpen>]
88
module Common =
99
let UC_API_MAJOR = 2
10+
let UC_API_MINOR = 1
1011

11-
let UC_API_MINOR = 0
12-
let UC_API_PATCH = 2
13-
let UC_API_EXTRA = 1
12+
let UC_API_PATCH = 0
13+
let UC_API_EXTRA = 255
1414
let UC_VERSION_MAJOR = 2
15+
let UC_VERSION_MINOR = 1
1516

16-
let UC_VERSION_MINOR = 0
17-
let UC_VERSION_PATCH = 2
18-
let UC_VERSION_EXTRA = 1
17+
let UC_VERSION_PATCH = 0
18+
let UC_VERSION_EXTRA = 255
1919
let UC_SECOND_SCALE = 1000000
2020
let UC_MILISECOND_SCALE = 1000
2121
let UC_ARCH_ARM = 1
@@ -80,6 +80,7 @@ module Common =
8080
let UC_ERR_HOOK_EXIST = 19
8181
let UC_ERR_RESOURCE = 20
8282
let UC_ERR_EXCEPTION = 21
83+
let UC_ERR_OVERFLOW = 22
8384
let UC_MEM_READ = 16
8485
let UC_MEM_WRITE = 17
8586
let UC_MEM_FETCH = 18
@@ -145,10 +146,14 @@ module Common =
145146
let UC_CTL_TB_FLUSH = 10
146147
let UC_CTL_TLB_FLUSH = 11
147148
let UC_CTL_TLB_TYPE = 12
149+
let UC_CTL_TCG_BUFFER_SIZE = 13
150+
let UC_CTL_CONTEXT_MODE = 14
148151

149152
let UC_PROT_NONE = 0
150153
let UC_PROT_READ = 1
151154
let UC_PROT_WRITE = 2
152155
let UC_PROT_EXEC = 4
153156
let UC_PROT_ALL = 7
157+
let UC_CTL_CONTEXT_CPU = 1
158+
let UC_CTL_CONTEXT_MEMORY = 2
154159

bindings/dotnet/UnicornEngine/UnicornEngine.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Copyright>Copyright © Antonio Parata 2016</Copyright>
77
<RepositoryUrl>https://github.com/unicorn-engine/unicorn</RepositoryUrl>
88
<PackageDescription>.NET bindings for unicorn</PackageDescription>
9-
<VersionPrefix>2.0.2-rc1</VersionPrefix>
9+
<VersionPrefix>2.1.0</VersionPrefix>
1010
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
1111
<ProjectGuid>0c21f1c1-2725-4a46-9022-1905f85822a5</ProjectGuid>
1212
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

bindings/dotnet/UnicornSamples/UnicornSamples.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyName>UnicornSamples</AssemblyName>
77
<Copyright>Copyright © Antonio Parata 2016</Copyright>
88
<RepositoryUrl>https://github.com/unicorn-engine/unicorn</RepositoryUrl>
9-
<Version>2.0.2-rc1</Version>
9+
<Version>2.1.0</Version>
1010
<ProjectGuid>{B80B5987-1E24-4309-8BF9-C4F91270F21C}</ProjectGuid>
1111
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1212
</PropertyGroup>

bindings/go/unicorn/unicorn_const.go

+11-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package unicorn
22
// For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [unicorn_const.go]
33
const (
44
API_MAJOR = 2
5+
API_MINOR = 1
56

6-
API_MINOR = 0
7-
API_PATCH = 2
8-
API_EXTRA = 1
7+
API_PATCH = 0
8+
API_EXTRA = 255
99
VERSION_MAJOR = 2
10+
VERSION_MINOR = 1
1011

11-
VERSION_MINOR = 0
12-
VERSION_PATCH = 2
13-
VERSION_EXTRA = 1
12+
VERSION_PATCH = 0
13+
VERSION_EXTRA = 255
1414
SECOND_SCALE = 1000000
1515
MILISECOND_SCALE = 1000
1616
ARCH_ARM = 1
@@ -75,6 +75,7 @@ const (
7575
ERR_HOOK_EXIST = 19
7676
ERR_RESOURCE = 20
7777
ERR_EXCEPTION = 21
78+
ERR_OVERFLOW = 22
7879
MEM_READ = 16
7980
MEM_WRITE = 17
8081
MEM_FETCH = 18
@@ -140,10 +141,14 @@ const (
140141
CTL_TB_FLUSH = 10
141142
CTL_TLB_FLUSH = 11
142143
CTL_TLB_TYPE = 12
144+
CTL_TCG_BUFFER_SIZE = 13
145+
CTL_CONTEXT_MODE = 14
143146

144147
PROT_NONE = 0
145148
PROT_READ = 1
146149
PROT_WRITE = 2
147150
PROT_EXEC = 4
148151
PROT_ALL = 7
152+
CTL_CONTEXT_CPU = 1
153+
CTL_CONTEXT_MEMORY = 2
149154
)

bindings/java/CMakeLists.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cmake_minimum_required(VERSION 3.1)
2+
3+
find_package(JNI)
4+
5+
if (JNI_FOUND)
6+
message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
7+
message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
8+
else()
9+
message(FATAL_ERROR "JNI not found, please try to update JAVA_HOME accordingly")
10+
endif()
11+
12+
add_library(unicorn_java SHARED unicorn_Unicorn.c)
13+
14+
message("${CMAKE_CURRENT_SOURCE_DIR}/bindings/java/target/headers")
15+
16+
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/target/headers")
17+
message(FATAL_ERROR "bindings/java/target/headers not generated, please generate them firstly")
18+
endif()
19+
20+
target_include_directories(unicorn_java PRIVATE target/headers ${JNI_INCLUDE_DIRS})
21+
target_link_libraries(unicorn_java PRIVATE unicorn ${JNI_LIBRARIES})

bindings/java/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ unicorn_Unicorn.o: unicorn_Unicorn.c target/headers/unicorn_Unicorn.h
3636
libunicorn_java$(LIB_EXT): $(OBJS)
3737
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
3838

39+
gen_const:
40+
cd .. && python3 const_generator.py java
41+
3942
clean:
4043
rm -f libunicorn_java$(LIB_EXT)
4144
rm -f $(OBJS)

bindings/java/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.unicorn-engine</groupId>
88
<artifactId>unicorn</artifactId>
9-
<version>2.0</version>
9+
<version>2.1.0</version>
1010

1111
<name>unicorn</name>
1212
<url>https://www.unicorn-engine.org</url>

bindings/java/src/main/java/unicorn/UnicornConst.java

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
public interface UnicornConst {
66
public static final int UC_API_MAJOR = 2;
7+
public static final int UC_API_MINOR = 1;
78

8-
public static final int UC_API_MINOR = 0;
9-
public static final int UC_API_PATCH = 2;
10-
public static final int UC_API_EXTRA = 1;
9+
public static final int UC_API_PATCH = 0;
10+
public static final int UC_API_EXTRA = 255;
1111
public static final int UC_VERSION_MAJOR = 2;
12+
public static final int UC_VERSION_MINOR = 1;
1213

13-
public static final int UC_VERSION_MINOR = 0;
14-
public static final int UC_VERSION_PATCH = 2;
15-
public static final int UC_VERSION_EXTRA = 1;
14+
public static final int UC_VERSION_PATCH = 0;
15+
public static final int UC_VERSION_EXTRA = 255;
1616
public static final int UC_SECOND_SCALE = 1000000;
1717
public static final int UC_MILISECOND_SCALE = 1000;
1818
public static final int UC_ARCH_ARM = 1;
@@ -144,11 +144,14 @@ public interface UnicornConst {
144144
public static final int UC_CTL_TLB_FLUSH = 11;
145145
public static final int UC_CTL_TLB_TYPE = 12;
146146
public static final int UC_CTL_TCG_BUFFER_SIZE = 13;
147+
public static final int UC_CTL_CONTEXT_MODE = 14;
147148

148149
public static final int UC_PROT_NONE = 0;
149150
public static final int UC_PROT_READ = 1;
150151
public static final int UC_PROT_WRITE = 2;
151152
public static final int UC_PROT_EXEC = 4;
152153
public static final int UC_PROT_ALL = 7;
154+
public static final int UC_CTL_CONTEXT_CPU = 1;
155+
public static final int UC_CTL_CONTEXT_MEMORY = 2;
153156

154157
}

bindings/pascal/unicorn/UnicornConst.pas

+11-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
interface
66

77
const UC_API_MAJOR = 2;
8+
UC_API_MINOR = 1;
89

9-
UC_API_MINOR = 0;
10-
UC_API_PATCH = 2;
11-
UC_API_EXTRA = 1;
10+
UC_API_PATCH = 0;
11+
UC_API_EXTRA = 255;
1212
UC_VERSION_MAJOR = 2;
13+
UC_VERSION_MINOR = 1;
1314

14-
UC_VERSION_MINOR = 0;
15-
UC_VERSION_PATCH = 2;
16-
UC_VERSION_EXTRA = 1;
15+
UC_VERSION_PATCH = 0;
16+
UC_VERSION_EXTRA = 255;
1717
UC_SECOND_SCALE = 1000000;
1818
UC_MILISECOND_SCALE = 1000;
1919
UC_ARCH_ARM = 1;
@@ -78,6 +78,7 @@ interface
7878
UC_ERR_HOOK_EXIST = 19;
7979
UC_ERR_RESOURCE = 20;
8080
UC_ERR_EXCEPTION = 21;
81+
UC_ERR_OVERFLOW = 22;
8182
UC_MEM_READ = 16;
8283
UC_MEM_WRITE = 17;
8384
UC_MEM_FETCH = 18;
@@ -143,12 +144,16 @@ interface
143144
UC_CTL_TB_FLUSH = 10;
144145
UC_CTL_TLB_FLUSH = 11;
145146
UC_CTL_TLB_TYPE = 12;
147+
UC_CTL_TCG_BUFFER_SIZE = 13;
148+
UC_CTL_CONTEXT_MODE = 14;
146149

147150
UC_PROT_NONE = 0;
148151
UC_PROT_READ = 1;
149152
UC_PROT_WRITE = 2;
150153
UC_PROT_EXEC = 4;
151154
UC_PROT_ALL = 7;
155+
UC_CTL_CONTEXT_CPU = 1;
156+
UC_CTL_CONTEXT_MEMORY = 2;
152157

153158
implementation
154159
end.

bindings/python/.gdb_history

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
q
2+
rr
3+
r
4+
bt
5+
b tcg.c:3075
6+
r
7+
p ts
8+
p *ts
9+
bt
10+
q
11+
b translate.c:4810
12+
r
13+
q
14+
r
15+
b translate.c:4810
16+
frame level 5
17+
frame level 7
18+
q
19+
r
20+
bt
21+
q
22+
r
23+
bt
24+
q
25+
r
26+
bt
27+
b translate.c:4810
28+
r
29+
p/x s->pc
30+
n
31+
n
32+
n
33+
n
34+
n
35+
n
36+
n
37+
n
38+
p/x aflag
39+
n
40+
n
41+
n
42+
p/x dflag
43+
n
44+
n
45+
n
46+
n
47+
p/x f
48+
n
49+
s
50+
n
51+
n
52+
n
53+
n
54+
n
55+
n
56+
n
57+
n
58+
n
59+
n
60+
n
61+
n
62+
n
63+
n
64+
n
65+
q
66+
r
67+
bt
68+
q
69+
r
70+
bt
71+
frame level 7
72+
p/x op
73+
p op
74+
p *op
75+
q
76+
b tcg_optimize
77+
r
78+
b tcg_optimize_x86_64
79+
r
80+
n
81+
s
82+
s
83+
s
84+
q
85+
r
86+
exit
87+
b tcg_dump_ops
88+
r
89+
b tcg_dump_ops
90+
b tcg_dump_ops_x86_64
91+
r
92+
b tcg_optimize_x86_64
93+
r
94+
b tcg_optimize_x86_64
95+
r
96+
b tcg_optimize_x86_64
97+
r
98+
b print_log
99+
r
100+
b print_log
101+
r
102+
f fprintf
103+
q
104+
b write
105+
r
106+
bt
107+
q

bindings/python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
UC_DIR = SRC_DIR if os.path.exists(SRC_DIR) else os.path.join(ROOT_DIR, '../..')
3333
BUILD_DIR = os.path.join(UC_DIR, 'build_python')
3434

35-
VERSION = "2.0.2"
35+
VERSION = "2.1.0"
3636

3737
if SYSTEM == 'darwin':
3838
LIBRARY_FILE = "libunicorn.2.dylib"

0 commit comments

Comments
 (0)