1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/*
* ptrace(2)-based-tracing-backend-specific definitions.
*
* Copyright (c) 2017 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#include "ptrace_backend.h"
#include "ptrace_wait_data.h"
#if ADDITIONAL_TRACING_BACKENDS
const struct tracing_backend ptrace_backend = {
.name = "ptrace",
.init = ptrace_init,
.startup_child = ptrace_startup_child,
.attach_tcb = ptrace_attach_tcb,
.detach = ptrace_detach,
.trace_wait_data_size = sizeof(struct ptrace_wait_data),
.init_trace_wait_data = ptrace_init_trace_wait_data,
.copy_trace_wait_data = ptrace_copy_trace_wait_data,
.free_trace_wait_data = ptrace_free_trace_wait_data,
.next_event = ptrace_next_event,
.handle_exec = ptrace_handle_exec,
.restart_process = ptrace_restart_process,
.clear_regs = ptrace_clear_regs,
.get_regs = ptrace_get_regs,
.get_scno = ptrace_get_scno,
.set_scno = ptrace_set_scno,
.set_error = ptrace_set_error,
.set_success = ptrace_set_success,
.get_instruction_pointer = ptrace_get_instruction_pointer,
.get_stack_pointer = ptrace_get_stack_pointer,
.get_syscall_args = ptrace_get_syscall_args,
.get_syscall_result = ptrace_get_syscall_result,
.umoven = ptrace_umoven,
.umovestr = ptrace_umovestr,
.upeek = ptrace_upeek,
.upoke = ptrace_upoke,
/* ptrace(2)-based backend is always local */
.kill = local_kill,
.realpath = local_realpath,
.open = local_open,
.pread = local_pread,
.close = local_close,
.readlink = local_readlink,
.stat = local_stat,
.fstat = local_fstat,
.getxattr = local_getxattr,
.socket = local_socket,
.sendmsg = local_sendmsg,
.recvmsg = local_recvmsg,
};
#endif /* ADDITIONAL_TRACING_BACKENDS */
|