]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdb-events.h
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / gdb-events.h
CommitLineData
104c1213 1/* User Interface Events.
349c5d5f 2
6aba47ca 3 Copyright (C) 1999, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
104c1213
JM
4
5 Contributed by Cygnus Solutions.
6
afbfc876 7 This file is part of GDB.
104c1213 8
afbfc876
AC
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
a9762ec7 11 the Free Software Foundation; either version 3 of the License, or
afbfc876 12 (at your option) any later version.
104c1213 13
afbfc876
AC
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
104c1213 18
afbfc876 19 You should have received a copy of the GNU General Public License
a9762ec7 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
104c1213
JM
21
22/* Work in progress */
23
24/* This file was created with the aid of ``gdb-events.sh''.
25
26 The bourn shell script ``gdb-events.sh'' creates the files
27 ``new-gdb-events.c'' and ``new-gdb-events.h and then compares
28 them against the existing ``gdb-events.[hc]''. Any differences
29 found being reported.
30
31 If editing this file, please also run gdb-events.sh and merge any
32 changes into that script. Conversely, when making sweeping changes
33 to this file, modifying gdb-events.sh and using its output may
34 prove easier. */
35
36
37#ifndef GDB_EVENTS_H
38#define GDB_EVENTS_H
39
104c1213
JM
40
41/* COMPAT: pointer variables for old, unconverted events.
42 A call to set_gdb_events() will automatically update these. */
43
44
45
30867156
MS
46/* Type definition of all hook functions. Recommended pratice is to
47 first declare each hook function using the below ftype and then
48 define it. */
104c1213
JM
49
50typedef void (gdb_events_breakpoint_create_ftype) (int b);
51typedef void (gdb_events_breakpoint_delete_ftype) (int b);
52typedef void (gdb_events_breakpoint_modify_ftype) (int b);
ba9fe036
KS
53typedef void (gdb_events_tracepoint_create_ftype) (int number);
54typedef void (gdb_events_tracepoint_delete_ftype) (int number);
55typedef void (gdb_events_tracepoint_modify_ftype) (int number);
67c2c32c 56typedef void (gdb_events_architecture_changed_ftype) (void);
104c1213
JM
57
58
59/* gdb-events: object. */
60
61struct gdb_events
62 {
63 gdb_events_breakpoint_create_ftype *breakpoint_create;
64 gdb_events_breakpoint_delete_ftype *breakpoint_delete;
65 gdb_events_breakpoint_modify_ftype *breakpoint_modify;
ba9fe036
KS
66 gdb_events_tracepoint_create_ftype *tracepoint_create;
67 gdb_events_tracepoint_delete_ftype *tracepoint_delete;
68 gdb_events_tracepoint_modify_ftype *tracepoint_modify;
67c2c32c 69 gdb_events_architecture_changed_ftype *architecture_changed;
104c1213
JM
70 };
71
72
73/* Interface into events functions.
c4093a6a 74 Where a *_p() predicate is present, it must be called before
30867156 75 calling the hook proper. */
104c1213
JM
76extern void breakpoint_create_event (int b);
77extern void breakpoint_delete_event (int b);
78extern void breakpoint_modify_event (int b);
ba9fe036
KS
79extern void tracepoint_create_event (int number);
80extern void tracepoint_delete_event (int number);
81extern void tracepoint_modify_event (int number);
67c2c32c 82extern void architecture_changed_event (void);
104c1213 83
30867156 84/* Install custom gdb-events hooks. */
2726dafc 85extern struct gdb_events *deprecated_set_gdb_event_hooks (struct gdb_events *vector);
104c1213 86
30867156 87/* Deliver any pending events. */
104c1213
JM
88extern void gdb_events_deliver (struct gdb_events *vector);
89
30867156 90/* Clear event handlers. */
63d022e0
KS
91extern void clear_gdb_event_hooks (void);
92
104c1213 93#endif