Improved syscall220 debug

This commit is contained in:
Syrus 2019-06-11 17:36:13 +02:00
parent 5d93d9a904
commit 0b416e14c3
2 changed files with 2 additions and 5 deletions

View File

@ -631,11 +631,6 @@ pub fn ___syscall218(_ctx: &mut Ctx, _one: i32, _two: i32) -> i32 {
-1
}
pub fn ___syscall220(_ctx: &mut Ctx, _one: i32, _two: i32) -> i32 {
debug!("emscripten::___syscall220");
-1
}
// fcntl64
pub fn ___syscall221(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
debug!("emscripten::___syscall221 (fcntl64) {}", _which);

View File

@ -74,6 +74,7 @@ use libc::{
SO_REUSEADDR,
TIOCGWINSZ,
};
use std::ffi::CStr;
use wasmer_runtime_core::vm::Ctx;
use crate::utils;
@ -878,6 +879,7 @@ pub fn ___syscall220(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
i += 1;
}
*(dirp.add(pos + 19 + i) as *mut i8) = 0 as i8;
debug!(" => file {}", CStr::from_ptr((dirp.add(pos + 19) as *const i8)).to_str().unwrap());
}
pos += offset;
}