달력

6

« 2025/6 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
2012. 11. 6. 00:31

struct pt_regs 카테고리 없음2012. 11. 6. 00:31

Take a look at the definition of struct pt_regs in arch/x86/include/asm/ptrace.h.

Notice #ifndef __KERNEL__ stuff there, it means that the definition of that structure is different for kernel-mode and user-mode code.

For the kernel code, pt_regs::ax is probably the value you need. It should contain the value of%eax on a 32-bit system and %rax on a 64-bit one.


이글을 보면

kernel 모드와 user모드에서 사용하는 레지스터가 다르네

:
Posted by НooпeУ


Code Start Code End