Commit | Line | Data |
---|---|---|
104c1213 | 1 | /* User Interface Events. |
349c5d5f | 2 | |
197e01b6 | 3 | Copyright (C) 1999, 2001, 2002, 2004 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 | |
11 | the Free Software Foundation; either version 2 of the License, or | |
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 AC |
19 | You should have received a copy of the GNU General Public License |
20 | along with this program; if not, write to the Free Software | |
197e01b6 EZ |
21 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 | Boston, MA 02110-1301, USA. */ | |
104c1213 JM |
23 | |
24 | /* Work in progress */ | |
25 | ||
26 | /* This file was created with the aid of ``gdb-events.sh''. | |
27 | ||
28 | The bourn shell script ``gdb-events.sh'' creates the files | |
29 | ``new-gdb-events.c'' and ``new-gdb-events.h and then compares | |
30 | them against the existing ``gdb-events.[hc]''. Any differences | |
31 | found being reported. | |
32 | ||
33 | If editing this file, please also run gdb-events.sh and merge any | |
34 | changes into that script. Conversely, when making sweeping changes | |
35 | to this file, modifying gdb-events.sh and using its output may | |
36 | prove easier. */ | |
37 | ||
38 | ||
39 | #ifndef GDB_EVENTS_H | |
40 | #define GDB_EVENTS_H | |
41 | ||
104c1213 JM |
42 | |
43 | /* COMPAT: pointer variables for old, unconverted events. | |
44 | A call to set_gdb_events() will automatically update these. */ | |
45 | ||
46 | ||
47 | ||
30867156 MS |
48 | /* Type definition of all hook functions. Recommended pratice is to |
49 | first declare each hook function using the below ftype and then | |
50 | define it. */ | |
104c1213 JM |
51 | |
52 | typedef void (gdb_events_breakpoint_create_ftype) (int b); | |
53 | typedef void (gdb_events_breakpoint_delete_ftype) (int b); | |
54 | typedef void (gdb_events_breakpoint_modify_ftype) (int b); | |
ba9fe036 KS |
55 | typedef void (gdb_events_tracepoint_create_ftype) (int number); |
56 | typedef void (gdb_events_tracepoint_delete_ftype) (int number); | |
57 | typedef void (gdb_events_tracepoint_modify_ftype) (int number); | |
67c2c32c | 58 | typedef void (gdb_events_architecture_changed_ftype) (void); |
104c1213 JM |
59 | |
60 | ||
61 | /* gdb-events: object. */ | |
62 | ||
63 | struct gdb_events | |
64 | { | |
65 | gdb_events_breakpoint_create_ftype *breakpoint_create; | |
66 | gdb_events_breakpoint_delete_ftype *breakpoint_delete; | |
67 | gdb_events_breakpoint_modify_ftype *breakpoint_modify; | |
ba9fe036 KS |
68 | gdb_events_tracepoint_create_ftype *tracepoint_create; |
69 | gdb_events_tracepoint_delete_ftype *tracepoint_delete; | |
70 | gdb_events_tracepoint_modify_ftype *tracepoint_modify; | |
67c2c32c | 71 | gdb_events_architecture_changed_ftype *architecture_changed; |
104c1213 JM |
72 | }; |
73 | ||
74 | ||
75 | /* Interface into events functions. | |
c4093a6a | 76 | Where a *_p() predicate is present, it must be called before |
30867156 | 77 | calling the hook proper. */ |
104c1213 JM |
78 | extern void breakpoint_create_event (int b); |
79 | extern void breakpoint_delete_event (int b); | |
80 | extern void breakpoint_modify_event (int b); | |
ba9fe036 KS |
81 | extern void tracepoint_create_event (int number); |
82 | extern void tracepoint_delete_event (int number); | |
83 | extern void tracepoint_modify_event (int number); | |
67c2c32c | 84 | extern void architecture_changed_event (void); |
104c1213 | 85 | |
30867156 | 86 | /* Install custom gdb-events hooks. */ |
2726dafc | 87 | extern struct gdb_events *deprecated_set_gdb_event_hooks (struct gdb_events *vector); |
104c1213 | 88 | |
30867156 | 89 | /* Deliver any pending events. */ |
104c1213 JM |
90 | extern void gdb_events_deliver (struct gdb_events *vector); |
91 | ||
30867156 | 92 | /* Clear event handlers. */ |
63d022e0 KS |
93 | extern void clear_gdb_event_hooks (void); |
94 | ||
104c1213 | 95 | #endif |