mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Improved debug! in all emscripten calls
This commit is contained in:
parent
1db0306b8b
commit
adee7d42db
@ -2,7 +2,11 @@ use crate::webassembly::Instance;
|
||||
use libc::c_int;
|
||||
|
||||
// NOTE: Not implemented by Emscripten
|
||||
pub extern "C" fn ___lock(_which: c_int, _varargs: c_int, _instance: &mut Instance) {}
|
||||
pub extern "C" fn ___lock(_which: c_int, _varargs: c_int, _instance: &mut Instance) {
|
||||
debug!("emscripten::___lock");
|
||||
}
|
||||
|
||||
// NOTE: Not implemented by Emscripten
|
||||
pub extern "C" fn ___unlock(_which: c_int, _varargs: c_int, _instance: &mut Instance) {}
|
||||
pub extern "C" fn ___unlock(_which: c_int, _varargs: c_int, _instance: &mut Instance) {
|
||||
debug!("emscripten::___unlock");
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ pub extern "C" fn _sigaction(_signum: u32, _act: u32, _oldact: u32, _instance: &
|
||||
}
|
||||
|
||||
pub extern "C" fn _sigaddset(set: u32, signum: u32, instance: &mut Instance) -> i32 {
|
||||
debug!("emscripten::_sigaddset");
|
||||
let set_addr = instance.memory_offset_addr(0, set as _) as *mut u32;
|
||||
unsafe {
|
||||
*set_addr |= 1 << (signum - 1);
|
||||
@ -24,5 +25,6 @@ pub extern "C" fn _sigaddset(set: u32, signum: u32, instance: &mut Instance) ->
|
||||
}
|
||||
|
||||
pub extern "C" fn _sigprocmask() -> i32 {
|
||||
debug!("emscripten::_sigprocmask");
|
||||
0
|
||||
}
|
||||
|
@ -626,6 +626,7 @@ pub extern "C" fn ___syscall221(
|
||||
mut varargs: VarArgs,
|
||||
instance: &mut Instance,
|
||||
) -> c_int {
|
||||
debug!("emscripten::___syscall221 (fcntl64)");
|
||||
// fcntl64
|
||||
let _fd: i32 = varargs.get(instance);
|
||||
let cmd: u32 = varargs.get(instance);
|
||||
|
@ -16,6 +16,7 @@ use crate::webassembly::Instance;
|
||||
|
||||
/// emscripten: _gettimeofday
|
||||
pub extern "C" fn _gettimeofday(tp: c_int, tz: c_int, instance: &mut Instance) -> c_int {
|
||||
debug!("emscripten::_gettimeofday {} {}", tp, tz);
|
||||
#[repr(C)]
|
||||
struct GuestTimeVal {
|
||||
tv_sec: i32,
|
||||
@ -39,6 +40,7 @@ pub extern "C" fn _gettimeofday(tp: c_int, tz: c_int, instance: &mut Instance) -
|
||||
|
||||
/// emscripten: _clock_gettime
|
||||
pub extern "C" fn _clock_gettime(clk_id: c_int, tp: c_int, instance: &mut Instance) -> c_int {
|
||||
debug!("emscripten::_clock_gettime {} {}", clk_id, tp);
|
||||
#[repr(C)]
|
||||
struct GuestTimeSpec {
|
||||
tv_sec: i32,
|
||||
|
Loading…
Reference in New Issue
Block a user