2#include <cosmos/error/RuntimeError.hxx>
5#include <clues/SystemCallInfo.hxx>
6#include <clues/sysnrs/all.hxx>
10SystemCallInfo::SystemCallInfo() :
16 throw cosmos::RuntimeError{
"bad SysCallInfo state"};
19 using Arch = cosmos::ptrace::Arch;
20 const auto native = entryInfo()->syscallNr();
26 const auto x32_syscall = SystemCallNrX32{native};
27 m_native = x32_syscall;
32 m_native = x64_syscall;
39 m_native = i386_syscall;
46 m_native = aarch64_syscall;
52 throw cosmos::RuntimeError(
"unsupported ARCH");
void updateSysNr()
Update m_generic and m_native based on the raw system call nr.
@ X32
X86_64 with 32-bit pointers.
SystemCallNrAARCH64
Native system call numbers as used by Linux on the aarch64 ABI.
SystemCallNr
Abstract system call number usable across architectures and ABIs.
SystemCallNrX64
Native system call numbers as used by Linux on the x64 ABI.
clues::SystemCallNr to_generic(const SystemCallNrAARCH64 nr)
Convert the native system call nr. into its generic representation.
SystemCallNrI386
Native system call numbers as used by Linux on the i386 ABI.