Reputation: 123
I know it uses ptrace
for implementation,
and it can get arguments in registers,
but they're numbers only,
how does strace convert them into literal information?
Is it just hard code for every syscall?
Upvotes: 1
Views: 715
Reputation: 126203
Basically, yes, its hardcoded. If you look at the sourcecode (detail), you can see big tables of system calls and big switch statements that know how to decode all their various arguments and return values for multiple different OSes and CPUs
Upvotes: 2