home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1999 February / MACPOWER-1999-02.ISO.7z / MACPOWER-1999-02.ISO / 9902⁄AMUG / UTILITY / mac06-0.95.sit / mac06-0.95 / usr / include / sys / sys_ptrace.h next >
Text File  |  1998-04-30  |  1KB  |  53 lines

  1. /* mac06ゥ1998 by HNS/DSITRI hns@computer.org
  2. ** sys/ptrace.h
  3. */
  4.  
  5. #pragma once
  6. #include "sys/types.h"
  7.  
  8. #define PTRACE_TRACEME        0
  9. #define PTRACE_MODEL        1
  10. #define PTRACE_ATTACH        2
  11. #define PTRACE_DETACH        3
  12. #define PTRACE_KILL            4
  13. #define PTRACE_CONT            5
  14. #define PTRACE_SYSCALL        6
  15. #define PTRACE_SINGLESTEP    7
  16. #define PTRACE_PEEK            8
  17. #define PTRACE_PEEKTEXT        PTRACE_PEEK
  18. #define PTRACE_PEEKDATA        PTRACE_PEEK
  19. #define PTRACE_PEEKUSR        PTRACE_PEEK
  20. #define PTRACE_POKE            9
  21. #define PTRACE_POKETEXT        PTRACE_POKE
  22. #define PTRACE_POKEDATA        PTRACE_POKE
  23. #define PTRACE_POKEUSR        PTRACE_POKE
  24. #define PTRACE_PEEKBLK        10
  25. #define PTRACE_POKEBLK        11
  26. #define PTRACE_PEEKREG        12
  27. #define PTRACE_POKEREG        13
  28. #define PTRACE_REGNAME        14        /* pass char name[*data] */
  29. /* set/reset breakpoints */
  30.  
  31. struct ptrace_blk
  32.     { /* pass as addr parameter */
  33.     void *addr;
  34.     long len;
  35.     };
  36.  
  37. struct ptrace_model
  38.     { /* pass as addr parameter */
  39.     int addrsize;        /* in bit */
  40.     int maxdatasize;    /* in bit */
  41.     int numreg;            /* total number of registers */
  42.     short flags;        /* little or bigendian, ... */
  43. #define PTRACE_BIGENDIAN    0x0001
  44. #define PTRACE_LITTLEENDIAN    0x0002
  45. /* stack growth direction */
  46. /* has flag registers */
  47. /* which one is PC, SP */
  48.     char model[8];        /* processor model */
  49.     };
  50.  
  51. int ptrace(int req, pid_t pid, void *addr, unsigned long *data);
  52.  
  53. /* EOF */