My goal is to use ptrace to set the program counter (and other registers) of a process running a 32-bit ARM executable on a 64-bit processor.
If this was a 64-bit executable, then I could use the pc field of struct user_pt_regs (defined in asm/ptrace.h).
Which structure would I use for a 32-bit executable? I see struct user_regs (in sys/user.h) defined as
struct user_regs {
unsigned long uregs[18];
};
I read the answer for this question (though the author admitted that this was an educated guess) which suggests the use of uregs[15] from struct user_regs. However, would that still work in my case since I actually have a 64-bit system?