ptrace-generic.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __UM_PTRACE_GENERIC_H
  6. #define __UM_PTRACE_GENERIC_H
  7. #ifndef __ASSEMBLY__
  8. #include "linux/config.h"
  9. #define pt_regs pt_regs_subarch
  10. #define show_regs show_regs_subarch
  11. #define send_sigtrap send_sigtrap_subarch
  12. #include "asm/arch/ptrace.h"
  13. #undef pt_regs
  14. #undef show_regs
  15. #undef send_sigtrap
  16. #undef user_mode
  17. #undef instruction_pointer
  18. #include "sysdep/ptrace.h"
  19. struct pt_regs {
  20. union uml_pt_regs regs;
  21. };
  22. #define EMPTY_REGS { regs : EMPTY_UML_PT_REGS }
  23. #define PT_REGS_IP(r) UPT_IP(&(r)->regs)
  24. #define PT_REGS_SP(r) UPT_SP(&(r)->regs)
  25. #define PT_REG(r, reg) UPT_REG(&(r)->regs, reg)
  26. #define PT_REGS_SET(r, reg, val) UPT_SET(&(r)->regs, reg, val)
  27. #define PT_REGS_SET_SYSCALL_RETURN(r, res) \
  28. UPT_SET_SYSCALL_RETURN(&(r)->regs, res)
  29. #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
  30. #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
  31. #define PT_REGS_SC(r) UPT_SC(&(r)->regs)
  32. #define instruction_pointer(regs) PT_REGS_IP(regs)
  33. struct task_struct;
  34. extern unsigned long getreg(struct task_struct *child, int regno);
  35. extern int putreg(struct task_struct *child, int regno, unsigned long value);
  36. extern int get_fpregs(unsigned long buf, struct task_struct *child);
  37. extern int set_fpregs(unsigned long buf, struct task_struct *child);
  38. extern int get_fpxregs(unsigned long buf, struct task_struct *child);
  39. extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
  40. extern void show_regs(struct pt_regs *regs);
  41. extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs,
  42. int error_code);
  43. #endif
  44. #endif
  45. /*
  46. * Overrides for Emacs so that we follow Linus's tabbing style.
  47. * Emacs will notice this stuff at the end of the file and automatically
  48. * adjust the settings for this buffer only. This must remain at the end
  49. * of the file.
  50. * ---------------------------------------------------------------------------
  51. * Local variables:
  52. * c-file-style: "linux"
  53. * End:
  54. */