Where is eax in pt_regs structure? Only an ax is present

I am trying to use a structure pt_regsto get and set registers such as eax, but compilation errors tell me that it pt_regsdoes not have such a member eax.

However, I can get the register ax. Can someone tell me what is going on?

I am using a Ubuntu 32-bit Linux kernel interface 3.0.0. Thanks again.

+5
source share
1 answer

Take a look at the definition struct pt_regsin arch / x86 / include / asm / ptrace.h .

#ifndef __KERNEL__ , , .

pt_regs::ax - , , , . %eax 32- %rax 64- .

+4

All Articles