Skip to content

Commit

Permalink
Merge exit and return arms
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Oct 10, 2024
1 parent 567c873 commit a77d31d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/disassembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ pub fn disassemble_instruction<C: ContextObject>(
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); },
};
Expand Down

0 comments on commit a77d31d

Please sign in to comment.