ptrace.h 692 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <Kernel/API/POSIX/sys/types.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #define PT_TRACE_ME 1
  12. #define PT_ATTACH 2
  13. #define PT_CONTINUE 3
  14. #define PT_SYSCALL 4
  15. #define PT_GETREGS 5
  16. #define PT_DETACH 6
  17. #define PT_PEEK 7
  18. #define PT_POKE 8
  19. #define PT_SETREGS 9
  20. // Serenity extensions:
  21. #define PT_POKEDEBUG 10
  22. #define PT_PEEKDEBUG 11
  23. #define PT_PEEKBUF 12
  24. #define PT_READ_I PT_PEEK
  25. #define PT_READ_D PT_PEEK
  26. #define PT_WRITE_I PT_POKE
  27. #define PT_WRITE_D PT_POKE
  28. #define DEBUG_STATUS_REGISTER 6
  29. #define DEBUG_CONTROL_REGISTER 7
  30. #ifdef __cplusplus
  31. }
  32. #endif