mirror of
https://github.com/encounter/objdiff.git
synced 2026-07-10 12:18:36 -07:00
Strip trailing int3 instructions (alignment padding) for x64 (#354)
* Strip trailing int3 instructions (alignment padding) for x64 * Improve strip trailing int3 instructions * Improve strip trailing int3 instructions again
This commit is contained in:
@@ -181,6 +181,12 @@ impl Arch for ArchX86 {
|
||||
branch_dest,
|
||||
});
|
||||
}
|
||||
// Strip trailing int3 instructions (alignment padding) for x64
|
||||
if matches!(self.arch, Architecture::X86_64) {
|
||||
while out.last().is_some_and(|i| i.opcode == iced_x86::Mnemonic::Int3 as u16) {
|
||||
out.pop();
|
||||
}
|
||||
}
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user