I'm trying to implement STRACE without options but I'm having a problem with SYSCALL arguments ex: SYSCALL 0 (read) in STRACE ->
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360q\2\0\0\0\0\0"..., 832) = 832
1 - I don't know exactly what is this string in the second argument.
2- When I try to return this string with PTRACE_PEEKTEXT, and put it into (char *) it does return the same as STRACE, but the problem with types, it returns integers some of them are printable and some of them is nonprintable ex : PEEK_TEXT: returned 0, I change it to ASCII then put it into the buffer; but sometimes PTRACE return an ASCII like 'E' 69 which is already printable. the problem is I don't know how to put the PEEK_TEXT return value correctly in a buffer
3- also in strace u see the values separated by '' but PEEK_TEXT never returned ''