home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / include / asm-sparc / ptrace.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-02  |  1.0 KB  |  33 lines

  1. #ifndef _SPARC_PTRACE_H
  2. #define _SPARC_PTRACE_H
  3.  
  4. /* I have not looked enough into how this should be done. Without playing
  5.  * lots of tricks to optimize I think we need to save the whole register
  6.  * window frame plus the floating-point registers. We'll see...
  7.  */
  8.  
  9. /* this struct defines the way the registers are stored on the 
  10.    stack during a system call. */
  11.  
  12. struct pt_regs {
  13.     unsigned long ps;    /* previous supervisor, same as alpha I believe */
  14.     unsigned long pc;    /* current and next program counter */
  15.     unsigned long npc;
  16.     unsigned long sp;    /* stack and frame pointer */
  17.     unsigned long fp;
  18.     unsigned long psr;   /* for condition codes */
  19.     unsigned long nuwin; /* number of user windows */
  20.     /* not sure yet whether all regs are necessary
  21.      * but this is how it is traditionally done on the sparc.
  22.      */
  23.     unsigned long u_regs[24*16];
  24.     unsigned long f_regs[64];    /* yuck yuck yuck */
  25. };
  26.  
  27. #ifdef __KERNEL__
  28. #define user_mode(regs) (0x0)  /* if previous supervisor is 0, came from user */
  29. extern void show_regs(struct pt_regs *);
  30. #endif
  31.  
  32. #endif
  33.