MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / print_all

Function print_all

cranelift/src/disasm.rs:100–119  ·  view source on GitHub ↗
(
    isa: &dyn TargetIsa,
    func: &Function,
    mem: &[u8],
    code_size: u32,
    print: bool,
    relocs: &[FinalizedMachReloc],
    traps: &[MachTrap],
)

Source from the content-addressed store, hash-verified

98}
99
100pub fn print_all(
101 isa: &dyn TargetIsa,
102 func: &Function,
103 mem: &[u8],
104 code_size: u32,
105 print: bool,
106 relocs: &[FinalizedMachReloc],
107 traps: &[MachTrap],
108) -> Result<()> {
109 print_bytes(&mem);
110 print_disassembly(func, isa, &mem[0..code_size as usize])?;
111 if print {
112 println!(
113 "\n{}\n{}",
114 print_relocs(&func.params, relocs),
115 print_traps(traps),
116 );
117 }
118 Ok(())
119}
120
121pub fn print_bytes(mem: &[u8]) {
122 print!(".byte ");

Callers 1

handle_moduleFunction · 0.85

Calls 2

print_bytesFunction · 0.85
OkFunction · 0.85

Tested by

no test coverage detected