Improved debug statements

Same commit as aba907cbc4 but without using the log debug macro (as causes fail)
This commit is contained in:
Syrus Akbary 2018-11-17 00:05:41 -08:00
parent da23efa99f
commit a96c106b17
2 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ use libc::{printf, putchar};
extern "C" fn _printf(memory_offset: i32, extra: i32, instance: &Instance) -> i32 {
let mem = &instance.memories[0];
println!("instance = {:?}", instance);
return unsafe {
let base_memory_offset = mem.mmap.as_ptr().offset(memory_offset as isize) as *const i8;
printf(base_memory_offset, extra)

View File

@ -193,7 +193,7 @@ impl Instance {
func_context
.compile_and_emit(&*isa, &mut code_buf, &mut reloc_sink, &mut trap_sink)
.map_err(|e| {
println!("CompileError: {}", e.to_string());
debug!("CompileError: {}", e.to_string());
ErrorKind::CompileError(e.to_string())
})?;
// We set this code_buf to be readable & executable