tcg/i386: convert add/sub of 128 to sub/add of -128
[qemu/ar7.git] / include / gdbstub / user.h
blobd392e510c59c2ab130eabe1cfadf57f4ff2ee104
1 /*
2 * gdbstub user-mode only APIs
4 * Copyright (c) 2022 Linaro Ltd
6 * SPDX-License-Identifier: LGPL-2.0+
7 */
9 #ifndef GDBSTUB_USER_H
10 #define GDBSTUB_USER_H
12 /**
13 * gdb_handlesig() - yield control to gdb
14 * @cpu: CPU
15 * @sig: if non-zero, the signal number which caused us to stop
17 * This function yields control to gdb, when a user-mode-only target
18 * needs to stop execution. If @sig is non-zero, then we will send a
19 * stop packet to tell gdb that we have stopped because of this signal.
21 * This function will block (handling protocol requests from gdb)
22 * until gdb tells us to continue target execution. When it does
23 * return, the return value is a signal to deliver to the target,
24 * or 0 if no signal should be delivered, ie the signal that caused
25 * us to stop should be ignored.
27 int gdb_handlesig(CPUState *, int);
29 /**
30 * gdb_signalled() - inform remote gdb of sig exit
31 * @as: current CPUArchState
32 * @sig: signal number
34 void gdb_signalled(CPUArchState *as, int sig);
36 /**
37 * gdbserver_fork() - disable gdb stub for child processes.
38 * @cs: CPU
40 void gdbserver_fork(CPUState *cs);
43 #endif /* GDBSTUB_USER_H */