When using ptrace_attach.How can you know if the process you're attaching is running in 32 or 64 bits ?
I'm coding a little strace-like and I need to know if it's 32 or 64 bits because the number of the syscalls in RAX(EAX) will not have the same meaning.
When you're tracing a cmd (strace ls) it's quiet simple, you mmap the binary and you perform some checking with Elf.
But I cannot find anything regarding an already existing process ?
Thank you !