(root)/
strace-6.5/
src/
print_instruction_pointer.c
       1  /*
       2   * Copyright (c) 1999-2022 The strace developers.
       3   * All rights reserved.
       4   *
       5   * SPDX-License-Identifier: LGPL-2.1-or-later
       6   */
       7  
       8  #include "defs.h"
       9  
      10  void
      11  print_instruction_pointer(struct tcb *tcp)
      12  {
      13  	kernel_ulong_t ip;
      14  
      15  	tprint_attribute_begin();
      16  	if (get_instruction_pointer(tcp, &ip)) {
      17  		tprintf_string(current_wordsize == 4
      18  			       ? "%08" PRI_klx
      19  			       : "%016" PRI_klx, ip);
      20  	} else {
      21  		tprints_string(current_wordsize == 4
      22  			       ? "????????"
      23  			       : "????????????????");
      24  	}
      25  	tprint_attribute_end();
      26  	tprint_space();
      27  }