Update dependencies of rust bindings
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -67,6 +67,8 @@ bindings/python/unicorn.egg-info/
|
|||||||
bindings/python/unicorn/lib/
|
bindings/python/unicorn/lib/
|
||||||
bindings/python/unicorn/include/
|
bindings/python/unicorn/include/
|
||||||
bindings/python/MANIFEST
|
bindings/python/MANIFEST
|
||||||
|
bindings/rust/target/
|
||||||
|
bindings/rust/Cargo.lock
|
||||||
config.log
|
config.log
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,9 +19,8 @@ build = "build.rs"
|
|||||||
links = "unicorn"
|
links = "unicorn"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.0"
|
bitflags = "1.3"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
capstone="0.6.0"
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
build-helper = "0.1"
|
build-helper = "0.1"
|
||||||
|
@ -305,7 +305,6 @@ pub enum RegisterARM64 {
|
|||||||
VBAR_EL2 = 288,
|
VBAR_EL2 = 288,
|
||||||
VBAR_EL3 = 289,
|
VBAR_EL3 = 289,
|
||||||
ENDING = 290,
|
ENDING = 290,
|
||||||
|
|
||||||
// alias registers
|
// alias registers
|
||||||
// (assoc) IP0 = 215,
|
// (assoc) IP0 = 215,
|
||||||
// (assoc) IP1 = 216,
|
// (assoc) IP1 = 216,
|
||||||
|
@ -138,7 +138,6 @@ impl std::fmt::Debug for UnicornInner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> UnicornHandle<'a> {
|
impl<'a> UnicornHandle<'a> {
|
||||||
|
|
||||||
/// Return the architecture of the current emulator.
|
/// Return the architecture of the current emulator.
|
||||||
pub fn get_arch(&self) -> Arch {
|
pub fn get_arch(&self) -> Arch {
|
||||||
self.inner.arch
|
self.inner.arch
|
||||||
|
@ -156,7 +156,6 @@ pub enum RegisterMIPS {
|
|||||||
CP0_CONFIG3 = 137,
|
CP0_CONFIG3 = 137,
|
||||||
CP0_USERLOCAL = 138,
|
CP0_USERLOCAL = 138,
|
||||||
ENDING = 139,
|
ENDING = 139,
|
||||||
|
|
||||||
// alias registers
|
// alias registers
|
||||||
// (assoc) ZERO = 2,
|
// (assoc) ZERO = 2,
|
||||||
// (assoc) AT = 3,
|
// (assoc) AT = 3,
|
||||||
|
@ -618,8 +618,8 @@ fn x86_context_save_and_restore() {
|
|||||||
let x86_code: Vec<u8> = vec![
|
let x86_code: Vec<u8> = vec![
|
||||||
0x48, 0xB8, 0xEF, 0xBE, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x05,
|
0x48, 0xB8, 0xEF, 0xBE, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x05,
|
||||||
];
|
];
|
||||||
let mut unicorn = unicorn::Unicorn::new(Arch::X86, mode)
|
let mut unicorn =
|
||||||
.expect("failed to initialize unicorn instance");
|
unicorn::Unicorn::new(Arch::X86, mode).expect("failed to initialize unicorn instance");
|
||||||
let mut emu = unicorn.borrow();
|
let mut emu = unicorn.borrow();
|
||||||
assert_eq!(emu.mem_map(0x1000, 0x4000, Permission::ALL), Ok(()));
|
assert_eq!(emu.mem_map(0x1000, 0x4000, Permission::ALL), Ok(()));
|
||||||
assert_eq!(emu.mem_write(0x1000, &x86_code), Ok(()));
|
assert_eq!(emu.mem_write(0x1000, &x86_code), Ok(()));
|
||||||
@ -635,8 +635,8 @@ fn x86_context_save_and_restore() {
|
|||||||
let context = context.unwrap();
|
let context = context.unwrap();
|
||||||
|
|
||||||
/* and create a new emulator, into which we will "restore" that context */
|
/* and create a new emulator, into which we will "restore" that context */
|
||||||
let mut unicorn2 = unicorn::Unicorn::new(Arch::X86, mode)
|
let mut unicorn2 =
|
||||||
.expect("failed to initialize unicorn instance");
|
unicorn::Unicorn::new(Arch::X86, mode).expect("failed to initialize unicorn instance");
|
||||||
let emu2 = unicorn2.borrow();
|
let emu2 = unicorn2.borrow();
|
||||||
assert_eq!(emu2.context_restore(&context), Ok(()));
|
assert_eq!(emu2.context_restore(&context), Ok(()));
|
||||||
for register in X86_REGISTERS.iter() {
|
for register in X86_REGISTERS.iter() {
|
||||||
|
Reference in New Issue
Block a user