Question

I have been messing around with ptrace and registers a lot lately and I was wondering if there is a difference between pt_regs and user_struct_regs as far as content goes. More specifically, do they both hold the same content(register values) but just have different named members to hold it.

I noticed that some architectures contain user_struct_regs, while others such as arm do not have it.

Was it helpful?

Solution

The format and layout of registers is highly architecture-specific. You have to read the definitions and comments in /usr/include/asm/user.h header. (For linux; the exact location might differ from OS to OS -- read the relevant ptrace documentation.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top