1 /*
2 * Copyright (c) 2021 The strace developers.
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8 #ifndef STRACE_POKE_H
9 # define STRACE_POKE_H
10
11 struct poke_payload {
12 char *data; /* data to be injected */
13 uint16_t data_len; /* length of the data, max 1024 */
14 uint8_t arg_no; /* number of the argument containing the pointer */
15 uint8_t is_enter; /* when to poke -- on entering or on exiting */
16 struct list_item l;
17 };
18
19 uint16_t alloc_poke_data(void);
20 bool poke_add(uint16_t poke_idx, struct poke_payload *poke);
21 void poke_tcb(struct tcb *, uint16_t poke_idx, bool isenter);
22
23 #endif /* !STRACE_POKE_H */