I am tracing a program using ptrace. After stopping on a syscall, I use PTRACE_PEEKUSER to look at the value of (ORIG_)EAX. Actually RAX since I'm 64 bit.
What is a good way of translating this into the appropriate value? For example 2-> "open" ( IIRC).