Browse Source

Hack to not allow inlining even when Rust wants to do it in release mode.

pull/103/head
Yury Delendik 6 years ago
committed by Dan Gohman
parent
commit
07a6ca8f4e
  1. 8
      wasmtime-runtime/src/jit_int.rs

8
wasmtime-runtime/src/jit_int.rs

@ -36,7 +36,13 @@ static mut __jit_debug_descriptor: JITDescriptor = JITDescriptor {
#[no_mangle]
#[inline(never)]
extern "C" fn __jit_debug_register_code() {}
extern "C" fn __jit_debug_register_code() {
// Hack to not allow inlining even when Rust wants to do it in release mode.
let x = 3;
unsafe {
std::ptr::read_volatile(&x);
}
}
/// Registeration for JIT image
pub struct GdbJitImageRegistration {

Loading…
Cancel
Save