home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / asm-um / ptrace-generic.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  1.7 KB  |  68 lines

  1. /* 
  2.  * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
  3.  * Licensed under the GPL
  4.  */
  5.  
  6. #ifndef __UM_PTRACE_GENERIC_H
  7. #define __UM_PTRACE_GENERIC_H
  8.  
  9. #ifndef __ASSEMBLY__
  10.  
  11.  
  12. #define pt_regs pt_regs_subarch
  13. #define show_regs show_regs_subarch
  14. #define send_sigtrap send_sigtrap_subarch
  15.  
  16. #include "asm/arch/ptrace.h"
  17.  
  18. #undef pt_regs
  19. #undef show_regs
  20. #undef send_sigtrap
  21. #undef user_mode
  22. #undef instruction_pointer
  23.  
  24. #include "sysdep/ptrace.h"
  25.  
  26. struct pt_regs {
  27.     union uml_pt_regs regs;
  28. };
  29.  
  30. #define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
  31.  
  32. #define PT_REGS_IP(r) UPT_IP(&(r)->regs)
  33. #define PT_REGS_SP(r) UPT_SP(&(r)->regs)
  34.  
  35. #define PT_REG(r, reg) UPT_REG(&(r)->regs, reg)
  36. #define PT_REGS_SET(r, reg, val) UPT_SET(&(r)->regs, reg, val)
  37.  
  38. #define PT_REGS_SET_SYSCALL_RETURN(r, res) \
  39.     UPT_SET_SYSCALL_RETURN(&(r)->regs, res)
  40. #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
  41.  
  42. #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
  43.  
  44. #define PT_REGS_SC(r) UPT_SC(&(r)->regs)
  45.  
  46. #define instruction_pointer(regs) PT_REGS_IP(regs)
  47.  
  48. struct task_struct;
  49.  
  50. extern unsigned long getreg(struct task_struct *child, int regno);
  51. extern int putreg(struct task_struct *child, int regno, unsigned long value);
  52. extern int get_fpregs(unsigned long buf, struct task_struct *child);
  53. extern int set_fpregs(unsigned long buf, struct task_struct *child);
  54. extern int get_fpxregs(unsigned long buf, struct task_struct *child);
  55. extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
  56.  
  57. extern void show_regs(struct pt_regs *regs);
  58.  
  59. extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs,
  60.              int error_code);
  61.  
  62. extern int arch_copy_tls(struct task_struct *new);
  63. extern void clear_flushed_tls(struct task_struct *task);
  64.  
  65. #endif
  66.  
  67. #endif
  68.