Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

trace_event.h 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (c) 2017-2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #ifndef STRACE_TRACE_EVENT_H
  8. # define STRACE_TRACE_EVENT_H
  9. /* Possible trace event loop states. Returned by next_event() and dispatched by
  10. * dispatch_event(). */
  11. enum trace_event {
  12. /* Break the main loop. */
  13. TE_BREAK,
  14. /* Call next_event() again. */
  15. TE_NEXT,
  16. /* Restart the tracee with signal 0 and call next_event() again. */
  17. TE_RESTART,
  18. /*
  19. * For all the events below, current_tcp is set to current tracee's
  20. * tcb. All the suggested actions imply that you want to continue
  21. * tracing of the current tracee; alternatively, you can detach it.
  22. */
  23. /*
  24. * Syscall entry or exit.
  25. * Restart the tracee with signal 0, or with an injected signal number.
  26. */
  27. TE_SYSCALL_STOP,
  28. /*
  29. * Tracee received signal with number WSTOPSIG(*pstatus); signal info
  30. * is written to *si. Restart the tracee (with that signal number
  31. * if you want to deliver it).
  32. */
  33. TE_SIGNAL_DELIVERY_STOP,
  34. /*
  35. * Tracee was killed by a signal with number WTERMSIG(*pstatus).
  36. */
  37. TE_SIGNALLED,
  38. /*
  39. * Tracee was stopped by a signal with number WSTOPSIG(*pstatus).
  40. * Restart the tracee with that signal number.
  41. */
  42. TE_GROUP_STOP,
  43. /*
  44. * Tracee exited with status WEXITSTATUS(*pstatus).
  45. */
  46. TE_EXITED,
  47. /*
  48. * Tracee is going to perform execve().
  49. * Restart the tracee with signal 0.
  50. */
  51. TE_STOP_BEFORE_EXECVE,
  52. /*
  53. * Tracee is going to terminate.
  54. * Restart the tracee with signal 0.
  55. */
  56. TE_STOP_BEFORE_EXIT,
  57. /*
  58. * SECCOMP_RET_TRACE rule is triggered.
  59. */
  60. TE_SECCOMP,
  61. };
  62. #endif /* !STRACE_TRACE_EVENT_H */