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.

print_instruction_pointer.c 447B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 1999-2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. void
  9. print_instruction_pointer(struct tcb *tcp)
  10. {
  11. kernel_ulong_t ip;
  12. if (get_instruction_pointer(tcp, &ip)) {
  13. tprintf(current_wordsize == 4
  14. ? "[%08" PRI_klx "] "
  15. : "[%016" PRI_klx "] ", ip);
  16. } else {
  17. tprints(current_wordsize == 4
  18. ? "[????????] "
  19. : "[????????????????] ");
  20. }
  21. }