diff options
author | Noah Gibbs <[email protected]> | 2022-08-11 17:11:23 +0100 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2022-08-29 08:47:10 -0700 |
commit | 471de2ab78ef75c7f22f80c77460e16e2356e190 (patch) | |
tree | 8e71db91eb7ec4fb0d1e660a1c9a623bb0213ccd /yjit/src/disasm.rs | |
parent | 7f4ab24f2b99c87874a5540a55026ea5a3d43d3e (diff) |
Enable skipdata on Capstone to allow embedded data without early stop to disasm (https://github.com/Shopify/ruby/pull/398)
Diffstat (limited to 'yjit/src/disasm.rs')
-rw-r--r-- | yjit/src/disasm.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yjit/src/disasm.rs b/yjit/src/disasm.rs index 62b270bce9..015c0c25ef 100644 --- a/yjit/src/disasm.rs +++ b/yjit/src/disasm.rs @@ -71,7 +71,7 @@ pub fn disasm_iseq_insn_range(iseq: IseqPtr, start_idx: u32, end_idx: u32) -> St use capstone::prelude::*; #[cfg(target_arch = "x86_64")] - let cs = Capstone::new() + let mut cs = Capstone::new() .x86() .mode(arch::x86::ArchMode::Mode64) .syntax(arch::x86::ArchSyntax::Intel) @@ -79,11 +79,13 @@ pub fn disasm_iseq_insn_range(iseq: IseqPtr, start_idx: u32, end_idx: u32) -> St .unwrap(); #[cfg(target_arch = "aarch64")] - let cs = Capstone::new() + let mut cs = Capstone::new() .arm64() .mode(arch::arm64::ArchMode::Arm) + .detail(true) .build() .unwrap(); + cs.set_skipdata(true); out.push_str(&format!("NUM BLOCK VERSIONS: {}\n", block_list.len())); out.push_str(&format!( |