0

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).

1 Answers1

0

You have to make your own table mapping the numbers to the names. I don't think there's any other way. I've often wished otherwise, but... Also, note that the mappings are arch-dependent.

Tom Tromey
  • 21,507
  • 2
  • 45
  • 63