strace/print_instruction_pointer.c
Dmitry V. Levin b93d52fe3d Change the license of strace to LGPL-2.1-or-later
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.

strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00

25 lines
447 B
C

/*
* Copyright (c) 1999-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
void
print_instruction_pointer(struct tcb *tcp)
{
kernel_ulong_t ip;
if (get_instruction_pointer(tcp, &ip)) {
tprintf(current_wordsize == 4
? "[%08" PRI_klx "] "
: "[%016" PRI_klx "] ", ip);
} else {
tprints(current_wordsize == 4
? "[????????] "
: "[????????????????] ");
}
}