ptrace.c 748 B

12345678910111213141516171819202122232425262728
  1. #include "linux/sched.h"
  2. #include "asm/ptrace.h"
  3. int putreg(struct task_struct *child, unsigned long regno,
  4. unsigned long value)
  5. {
  6. child->thread.process_regs.regs[regno >> 2] = value;
  7. return 0;
  8. }
  9. unsigned long getreg(struct task_struct *child, unsigned long regno)
  10. {
  11. unsigned long retval = ~0UL;
  12. retval &= child->thread.process_regs.regs[regno >> 2];
  13. return retval;
  14. }
  15. /*
  16. * Overrides for Emacs so that we follow Linus's tabbing style.
  17. * Emacs will notice this stuff at the end of the file and automatically
  18. * adjust the settings for this buffer only. This must remain at the end
  19. * of the file.
  20. * ---------------------------------------------------------------------------
  21. * Local variables:
  22. * c-file-style: "linux"
  23. * End:
  24. */