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