29 std::vector<SyscallArg>
args;
30 std::optional<Expected<i64>>
ret;
44 auto format(const ::asmgrader::SyscallRecord& from, format_context& ctx)
const {
45 if (is_debug_format) {
46 return format_to(ctx.out(),
47 "SyscallRecord{{.num = {} [SYS_{}], .args = {}, .ret = {}, .ip = 0x{:X}, .sp = 0x{:X}}}",
48 from.num, ::asmgrader::SYSCALL_MAP.at(from.num).name(), from.args, from.ret,
49 from.instruction_pointer, from.stack_pointer);
51 UNIMPLEMENTED(
"Use debug format spec `{:?}` for SyscallRecord");
std::variant wrapper for a partial implementation of C++23's expected type
Definition expected.hpp:34
#define UNIMPLEMENTED(msg,...)
For features that have not yet / are not planned to be implemented, so that I don't bang my head agai...
Definition logging.hpp:52
Definition asm_buffer.hpp:19
Record of a syscall for use with Tracer to keep track of which syscalls a child process invokes.
Definition syscall_record.hpp:22
std::optional< Expected< i64 > > ret
Definition syscall_record.hpp:30
u64 num
Definition syscall_record.hpp:28
std::variant< i32, i64, u32, u64, Result< std::string >, Result< std::vector< Result< std::string > > >, void *, Result< std::timespec > > SyscallArg
An arbitrary syscall argument void* is a catch-all for any pointer type.
Definition syscall_record.hpp:25
u64 stack_pointer
Definition syscall_record.hpp:33
std::vector< SyscallArg > args
Definition syscall_record.hpp:29
u64 instruction_pointer
Definition syscall_record.hpp:32