blob: d5e7f26bcb83bb89f2cf5f22eceefde810298aa9 [file] [log] [blame]
Peter Maydella44d57a2021-09-08 16:43:58 +01001/*
2 * strace.h: prototypes for linux-user builtin strace handling
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef LINUX_USER_STRACE_H
19#define LINUX_USER_STRACE_H
20
Philippe Mathieu-Daudéa0939b82022-05-09 22:57:27 +020021void print_syscall(CPUArchState *cpu_env, int num,
Peter Maydella44d57a2021-09-08 16:43:58 +010022 abi_long arg1, abi_long arg2, abi_long arg3,
23 abi_long arg4, abi_long arg5, abi_long arg6);
Philippe Mathieu-Daudéa0939b82022-05-09 22:57:27 +020024void print_syscall_ret(CPUArchState *cpu_env, int num, abi_long ret,
Peter Maydella44d57a2021-09-08 16:43:58 +010025 abi_long arg1, abi_long arg2, abi_long arg3,
26 abi_long arg4, abi_long arg5, abi_long arg6);
27/**
28 * print_taken_signal:
29 * @target_signum: target signal being taken
30 * @tinfo: target_siginfo_t which will be passed to the guest for the signal
31 *
32 * Print strace output indicating that this signal is being taken by the guest,
33 * in a format similar to:
34 * --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
35 */
36void print_taken_signal(int target_signum, const target_siginfo_t *tinfo);
37
38#endif /* LINUX_USER_STRACE_H */