Update dependencies of rust bindings

This commit is contained in:
Bet4
2021-10-06 22:43:14 +08:00
parent 0c976ec704
commit 8120a11f24
6 changed files with 7 additions and 9 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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"

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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() {