ptproxy.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**********************************************************************
  2. ptproxy.h
  3. Copyright (C) 1999 Lars Brinkhoff. See the file COPYING for licensing
  4. terms and conditions.
  5. **********************************************************************/
  6. #ifndef __PTPROXY_H
  7. #define __PTPROXY_H
  8. #include <sys/types.h>
  9. typedef struct debugger debugger_state;
  10. typedef struct debugee debugee_state;
  11. struct debugger
  12. {
  13. pid_t pid;
  14. int wait_options;
  15. int *wait_status_ptr;
  16. unsigned int waiting : 1;
  17. unsigned int real_wait : 1;
  18. unsigned int expecting_child : 1;
  19. int (*handle_trace) (debugger_state *, pid_t);
  20. debugee_state *debugee;
  21. };
  22. struct debugee
  23. {
  24. pid_t pid;
  25. int wait_status;
  26. unsigned int died : 1;
  27. unsigned int event : 1;
  28. unsigned int stopped : 1;
  29. unsigned int trace_singlestep : 1;
  30. unsigned int trace_syscall : 1;
  31. unsigned int traced : 1;
  32. unsigned int zombie : 1;
  33. unsigned int in_context : 1;
  34. };
  35. extern int debugger_syscall(debugger_state *debugger, pid_t pid);
  36. extern int debugger_normal_return (debugger_state *debugger, pid_t unused);
  37. extern long proxy_ptrace (struct debugger *, int, pid_t, long, long, pid_t,
  38. int *strace_out);
  39. extern void debugger_cancelled_return(debugger_state *debugger, int result);
  40. #endif
  41. /*
  42. * Overrides for Emacs so that we follow Linus's tabbing style.
  43. * Emacs will notice this stuff at the end of the file and automatically
  44. * adjust the settings for this buffer only. This must remain at the end
  45. * of the file.
  46. * ---------------------------------------------------------------------------
  47. * Local variables:
  48. * c-file-style: "linux"
  49. * End:
  50. */