GDB (xrefs)
/tmp/gdb-7.10/gdb/continuations.h
Go to the documentation of this file.
1 /* Continuations for GDB, the GNU debugger.
2 
3  Copyright (C) 1999-2015 Free Software Foundation, Inc.
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 
23 struct thread_info;
24 struct inferior;
25 
26 /* To continue the execution commands when running gdb asynchronously.
27  A continuation structure contains a pointer to a function to be called
28  to finish the command, once the target has stopped. Such mechanism is
29  used by the finish and until commands, and in the remote protocol
30  when opening an extended-remote connection. */
31 
32 /* Prototype of the continuation callback functions. ARG is the
33  continuation argument registered in the corresponding
34  add_*_continuation call. ERR is true when the command should be
35  cancelled instead of finished normally. In that case, the
36  continuation should clean up whatever state had been set up for the
37  command in question (e.g., remove momentary breakpoints). This
38  happens e.g., when an error was thrown while handling a target
39  event, or when the inferior thread the command was being executed
40  on exits. */
41 typedef void (continuation_ftype) (void *arg, int err);
42 
43 /* Prototype of the function responsible for releasing the argument
44  passed to the continuation callback functions, either when the
45  continuation is called, or discarded. */
46 typedef void (continuation_free_arg_ftype) (void *);
47 
48 /* Thread specific continuations. */
49 
50 extern void add_continuation (struct thread_info *,
51  continuation_ftype *, void *,
53 extern void do_all_continuations (int err);
54 extern void do_all_continuations_thread (struct thread_info *, int err);
55 extern void discard_all_continuations (void);
56 extern void discard_all_continuations_thread (struct thread_info *);
57 
58 extern void add_intermediate_continuation (struct thread_info *,
59  continuation_ftype *, void *,
61 extern void do_all_intermediate_continuations (int err);
62 extern void do_all_intermediate_continuations_thread (struct thread_info *, int err);
65 
66 /* Inferior specific (any thread) continuations. */
67 
69  void *,
71 extern void do_all_inferior_continuations (int err);
72 extern void discard_all_inferior_continuations (struct inferior *inf);
73 
74 #endif
void discard_all_intermediate_continuations_thread(struct thread_info *)
void add_inferior_continuation(continuation_ftype *, void *, continuation_free_arg_ftype *)
void( continuation_ftype)(void *arg, int err)
Definition: continuations.h:41
void do_all_intermediate_continuations(int err)
void( continuation_free_arg_ftype)(void *)
Definition: continuations.h:46
void discard_all_continuations(void)
void do_all_intermediate_continuations_thread(struct thread_info *, int err)
void do_all_continuations_thread(struct thread_info *, int err)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
Definition: gnu-nat.c:1816
void add_continuation(struct thread_info *, continuation_ftype *, void *, continuation_free_arg_ftype *)
Definition: gnu-nat.c:163
void do_all_continuations(int err)
void discard_all_intermediate_continuations(void)
void add_intermediate_continuation(struct thread_info *, continuation_ftype *, void *, continuation_free_arg_ftype *)
void do_all_inferior_continuations(int err)
void discard_all_inferior_continuations(struct inferior *inf)
void discard_all_continuations_thread(struct thread_info *)