2 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
5 * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
6 * Copyright (c) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Linux for s390 port by D.J. Barrow
8 * <barrow_dj@mail.yahoo.com,djbarrow@de.ibm.com>
9 * Copyright (c) 1999-2019 The strace developers.
10 * All rights reserved.
12 * SPDX-License-Identifier: LGPL-2.1-or-later
19 upeek(struct tcb *tcp, unsigned long off, kernel_ulong_t *res)
24 val = ptrace(PTRACE_PEEKUSER, (pid_t) tcp->pid, (void *) off, 0);
25 if (val == -1 && errno) {
27 perror_func_msg("PTRACE_PEEKUSER pid:%d @0x%lx)",
31 *res = (unsigned long) val;