gdb/continuations: do minor cleanup
[deliverable/binutils-gdb.git] / gdb / continuations.h
CommitLineData
be34f849
PA
1/* Continuations for GDB, the GNU debugger.
2
3666a048 3 Copyright (C) 1999-2021 Free Software Foundation, Inc.
be34f849
PA
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef CONTINUATIONS_H
21#define CONTINUATIONS_H
22
be34f849
PA
23struct inferior;
24
25/* To continue the execution commands when running gdb asynchronously.
26 A continuation structure contains a pointer to a function to be called
27 to finish the command, once the target has stopped. Such mechanism is
1194676e
TBA
28 used by the attach command and the remote target when a new inferior
29 is detected. */
be34f849 30
fa4cd53f
PA
31/* Prototype of the continuation callback functions. ARG is the
32 continuation argument registered in the corresponding
35682f0a
TBA
33 add_*_continuation call. */
34typedef void (continuation_ftype) (void *arg);
be34f849
PA
35
36/* Prototype of the function responsible for releasing the argument
37 passed to the continuation callback functions, either when the
38 continuation is called, or discarded. */
39typedef void (continuation_free_arg_ftype) (void *);
40
be34f849
PA
41/* Inferior specific (any thread) continuations. */
42
43extern void add_inferior_continuation (continuation_ftype *,
44 void *,
45 continuation_free_arg_ftype *);
35682f0a 46extern void do_all_inferior_continuations ();
be34f849
PA
47extern void discard_all_inferior_continuations (struct inferior *inf);
48
49#endif
This page took 0.70322 seconds and 4 git commands to generate.