From a77d31daa94bf20ce40f2fe3cb46f5d542495b9e Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 10 Oct 2024 11:01:16 -0300 Subject: [PATCH] Merge exit and return arms --- src/disassembler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/disassembler.rs b/src/disassembler.rs index c8065869..94a7695c 100644 --- a/src/disassembler.rs +++ b/src/disassembler.rs @@ -283,10 +283,10 @@ pub fn disassemble_instruction( desc = format!("{name} {function_name}"); }, ebpf::CALL_REG => { name = "callx"; desc = format!("{} r{}", name, if sbpf_version.callx_uses_src_reg() { insn.src } else { insn.imm as u8 }); }, - ebpf::EXIT if !sbpf_version.static_syscalls() => { name = "exit"; desc = name.to_string(); }, - ebpf::EXIT if sbpf_version.static_syscalls() => { name = "return"; desc = name.to_string(); }, - ebpf::RETURN if !sbpf_version.static_syscalls() => { name = "exit"; desc = name.to_string(); }, - ebpf::RETURN if sbpf_version.static_syscalls() => { name = "return"; desc = name.to_string(); }, + ebpf::EXIT + | ebpf::RETURN if !sbpf_version.static_syscalls() => { name = "exit"; desc = name.to_string(); }, + ebpf::EXIT + | ebpf::RETURN if sbpf_version.static_syscalls() => { name = "return"; desc = name.to_string(); }, _ => { name = "unknown"; desc = format!("{} opcode={:#x}", name, insn.opc); }, };