observer.h revision 1.1 1 1.1 christos /* This file is automatically generated. DO NOT EDIT! */
2 1.1 christos /* Generated from: NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp */
3 1.1 christos /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */
4 1.1 christos
5 1.1 christos /* GDB Notifications to Observers.
6 1.1 christos
7 1.1 christos Copyright (C) 2004-2014 Free Software Foundation, Inc.
8 1.1 christos
9 1.1 christos This file is part of GDB.
10 1.1 christos
11 1.1 christos This program is free software; you can redistribute it and/or modify
12 1.1 christos it under the terms of the GNU General Public License as published by
13 1.1 christos the Free Software Foundation; either version 3 of the License, or
14 1.1 christos (at your option) any later version.
15 1.1 christos
16 1.1 christos This program is distributed in the hope that it will be useful,
17 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of
18 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 1.1 christos GNU General Public License for more details.
20 1.1 christos
21 1.1 christos You should have received a copy of the GNU General Public License
22 1.1 christos along with this program. If not, see <http://www.gnu.org/licenses/>.
23 1.1 christos
24 1.1 christos --
25 1.1 christos
26 1.1 christos This file was generated using observer.sh and observer.texi. */
27 1.1 christos
28 1.1 christos #ifndef OBSERVER_H
29 1.1 christos #define OBSERVER_H
30 1.1 christos
31 1.1 christos struct observer;
32 1.1 christos struct bpstats;
33 1.1 christos struct so_list;
34 1.1 christos struct objfile;
35 1.1 christos struct thread_info;
36 1.1 christos struct inferior;
37 1.1 christos struct trace_state_variable;
38 1.1 christos
39 1.1 christos /* normal_stop notifications. */
40 1.1 christos
41 1.1 christos typedef void (observer_normal_stop_ftype) (struct bpstats *bs, int print_frame);
42 1.1 christos
43 1.1 christos extern struct observer *observer_attach_normal_stop (observer_normal_stop_ftype *f);
44 1.1 christos extern void observer_detach_normal_stop (struct observer *observer);
45 1.1 christos extern void observer_notify_normal_stop (struct bpstats *bs, int print_frame);
46 1.1 christos
47 1.1 christos /* target_changed notifications. */
48 1.1 christos
49 1.1 christos typedef void (observer_target_changed_ftype) (struct target_ops *target);
50 1.1 christos
51 1.1 christos extern struct observer *observer_attach_target_changed (observer_target_changed_ftype *f);
52 1.1 christos extern void observer_detach_target_changed (struct observer *observer);
53 1.1 christos extern void observer_notify_target_changed (struct target_ops *target);
54 1.1 christos
55 1.1 christos /* executable_changed notifications. */
56 1.1 christos
57 1.1 christos typedef void (observer_executable_changed_ftype) (void);
58 1.1 christos
59 1.1 christos extern struct observer *observer_attach_executable_changed (observer_executable_changed_ftype *f);
60 1.1 christos extern void observer_detach_executable_changed (struct observer *observer);
61 1.1 christos extern void observer_notify_executable_changed (void);
62 1.1 christos
63 1.1 christos /* inferior_created notifications. */
64 1.1 christos
65 1.1 christos typedef void (observer_inferior_created_ftype) (struct target_ops *objfile, int from_tty);
66 1.1 christos
67 1.1 christos extern struct observer *observer_attach_inferior_created (observer_inferior_created_ftype *f);
68 1.1 christos extern void observer_detach_inferior_created (struct observer *observer);
69 1.1 christos extern void observer_notify_inferior_created (struct target_ops *objfile, int from_tty);
70 1.1 christos
71 1.1 christos /* record_changed notifications. */
72 1.1 christos
73 1.1 christos typedef void (observer_record_changed_ftype) (struct inferior *inferior, int started);
74 1.1 christos
75 1.1 christos extern struct observer *observer_attach_record_changed (observer_record_changed_ftype *f);
76 1.1 christos extern void observer_detach_record_changed (struct observer *observer);
77 1.1 christos extern void observer_notify_record_changed (struct inferior *inferior, int started);
78 1.1 christos
79 1.1 christos /* solib_loaded notifications. */
80 1.1 christos
81 1.1 christos typedef void (observer_solib_loaded_ftype) (struct so_list *solib);
82 1.1 christos
83 1.1 christos extern struct observer *observer_attach_solib_loaded (observer_solib_loaded_ftype *f);
84 1.1 christos extern void observer_detach_solib_loaded (struct observer *observer);
85 1.1 christos extern void observer_notify_solib_loaded (struct so_list *solib);
86 1.1 christos
87 1.1 christos /* solib_unloaded notifications. */
88 1.1 christos
89 1.1 christos typedef void (observer_solib_unloaded_ftype) (struct so_list *solib);
90 1.1 christos
91 1.1 christos extern struct observer *observer_attach_solib_unloaded (observer_solib_unloaded_ftype *f);
92 1.1 christos extern void observer_detach_solib_unloaded (struct observer *observer);
93 1.1 christos extern void observer_notify_solib_unloaded (struct so_list *solib);
94 1.1 christos
95 1.1 christos /* new_objfile notifications. */
96 1.1 christos
97 1.1 christos typedef void (observer_new_objfile_ftype) (struct objfile *objfile);
98 1.1 christos
99 1.1 christos extern struct observer *observer_attach_new_objfile (observer_new_objfile_ftype *f);
100 1.1 christos extern void observer_detach_new_objfile (struct observer *observer);
101 1.1 christos extern void observer_notify_new_objfile (struct objfile *objfile);
102 1.1 christos
103 1.1 christos /* free_objfile notifications. */
104 1.1 christos
105 1.1 christos typedef void (observer_free_objfile_ftype) (struct objfile *objfile);
106 1.1 christos
107 1.1 christos extern struct observer *observer_attach_free_objfile (observer_free_objfile_ftype *f);
108 1.1 christos extern void observer_detach_free_objfile (struct observer *observer);
109 1.1 christos extern void observer_notify_free_objfile (struct objfile *objfile);
110 1.1 christos
111 1.1 christos /* new_thread notifications. */
112 1.1 christos
113 1.1 christos typedef void (observer_new_thread_ftype) (struct thread_info *t);
114 1.1 christos
115 1.1 christos extern struct observer *observer_attach_new_thread (observer_new_thread_ftype *f);
116 1.1 christos extern void observer_detach_new_thread (struct observer *observer);
117 1.1 christos extern void observer_notify_new_thread (struct thread_info *t);
118 1.1 christos
119 1.1 christos /* thread_exit notifications. */
120 1.1 christos
121 1.1 christos typedef void (observer_thread_exit_ftype) (struct thread_info *t, int silent);
122 1.1 christos
123 1.1 christos extern struct observer *observer_attach_thread_exit (observer_thread_exit_ftype *f);
124 1.1 christos extern void observer_detach_thread_exit (struct observer *observer);
125 1.1 christos extern void observer_notify_thread_exit (struct thread_info *t, int silent);
126 1.1 christos
127 1.1 christos /* thread_stop_requested notifications. */
128 1.1 christos
129 1.1 christos typedef void (observer_thread_stop_requested_ftype) (ptid_t ptid);
130 1.1 christos
131 1.1 christos extern struct observer *observer_attach_thread_stop_requested (observer_thread_stop_requested_ftype *f);
132 1.1 christos extern void observer_detach_thread_stop_requested (struct observer *observer);
133 1.1 christos extern void observer_notify_thread_stop_requested (ptid_t ptid);
134 1.1 christos
135 1.1 christos /* target_resumed notifications. */
136 1.1 christos
137 1.1 christos typedef void (observer_target_resumed_ftype) (ptid_t ptid);
138 1.1 christos
139 1.1 christos extern struct observer *observer_attach_target_resumed (observer_target_resumed_ftype *f);
140 1.1 christos extern void observer_detach_target_resumed (struct observer *observer);
141 1.1 christos extern void observer_notify_target_resumed (ptid_t ptid);
142 1.1 christos
143 1.1 christos /* about_to_proceed notifications. */
144 1.1 christos
145 1.1 christos typedef void (observer_about_to_proceed_ftype) (void);
146 1.1 christos
147 1.1 christos extern struct observer *observer_attach_about_to_proceed (observer_about_to_proceed_ftype *f);
148 1.1 christos extern void observer_detach_about_to_proceed (struct observer *observer);
149 1.1 christos extern void observer_notify_about_to_proceed (void);
150 1.1 christos
151 1.1 christos /* breakpoint_created notifications. */
152 1.1 christos
153 1.1 christos typedef void (observer_breakpoint_created_ftype) (struct breakpoint *b);
154 1.1 christos
155 1.1 christos extern struct observer *observer_attach_breakpoint_created (observer_breakpoint_created_ftype *f);
156 1.1 christos extern void observer_detach_breakpoint_created (struct observer *observer);
157 1.1 christos extern void observer_notify_breakpoint_created (struct breakpoint *b);
158 1.1 christos
159 1.1 christos /* breakpoint_deleted notifications. */
160 1.1 christos
161 1.1 christos typedef void (observer_breakpoint_deleted_ftype) (struct breakpoint *b);
162 1.1 christos
163 1.1 christos extern struct observer *observer_attach_breakpoint_deleted (observer_breakpoint_deleted_ftype *f);
164 1.1 christos extern void observer_detach_breakpoint_deleted (struct observer *observer);
165 1.1 christos extern void observer_notify_breakpoint_deleted (struct breakpoint *b);
166 1.1 christos
167 1.1 christos /* breakpoint_modified notifications. */
168 1.1 christos
169 1.1 christos typedef void (observer_breakpoint_modified_ftype) (struct breakpoint *b);
170 1.1 christos
171 1.1 christos extern struct observer *observer_attach_breakpoint_modified (observer_breakpoint_modified_ftype *f);
172 1.1 christos extern void observer_detach_breakpoint_modified (struct observer *observer);
173 1.1 christos extern void observer_notify_breakpoint_modified (struct breakpoint *b);
174 1.1 christos
175 1.1 christos /* traceframe_changed notifications. */
176 1.1 christos
177 1.1 christos typedef void (observer_traceframe_changed_ftype) (int tfnum, int tpnum);
178 1.1 christos
179 1.1 christos extern struct observer *observer_attach_traceframe_changed (observer_traceframe_changed_ftype *f);
180 1.1 christos extern void observer_detach_traceframe_changed (struct observer *observer);
181 1.1 christos extern void observer_notify_traceframe_changed (int tfnum, int tpnum);
182 1.1 christos
183 1.1 christos /* architecture_changed notifications. */
184 1.1 christos
185 1.1 christos typedef void (observer_architecture_changed_ftype) (struct gdbarch *newarch);
186 1.1 christos
187 1.1 christos extern struct observer *observer_attach_architecture_changed (observer_architecture_changed_ftype *f);
188 1.1 christos extern void observer_detach_architecture_changed (struct observer *observer);
189 1.1 christos extern void observer_notify_architecture_changed (struct gdbarch *newarch);
190 1.1 christos
191 1.1 christos /* thread_ptid_changed notifications. */
192 1.1 christos
193 1.1 christos typedef void (observer_thread_ptid_changed_ftype) (ptid_t old_ptid, ptid_t new_ptid);
194 1.1 christos
195 1.1 christos extern struct observer *observer_attach_thread_ptid_changed (observer_thread_ptid_changed_ftype *f);
196 1.1 christos extern void observer_detach_thread_ptid_changed (struct observer *observer);
197 1.1 christos extern void observer_notify_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid);
198 1.1 christos
199 1.1 christos /* inferior_added notifications. */
200 1.1 christos
201 1.1 christos typedef void (observer_inferior_added_ftype) (struct inferior *inf);
202 1.1 christos
203 1.1 christos extern struct observer *observer_attach_inferior_added (observer_inferior_added_ftype *f);
204 1.1 christos extern void observer_detach_inferior_added (struct observer *observer);
205 1.1 christos extern void observer_notify_inferior_added (struct inferior *inf);
206 1.1 christos
207 1.1 christos /* inferior_appeared notifications. */
208 1.1 christos
209 1.1 christos typedef void (observer_inferior_appeared_ftype) (struct inferior *inf);
210 1.1 christos
211 1.1 christos extern struct observer *observer_attach_inferior_appeared (observer_inferior_appeared_ftype *f);
212 1.1 christos extern void observer_detach_inferior_appeared (struct observer *observer);
213 1.1 christos extern void observer_notify_inferior_appeared (struct inferior *inf);
214 1.1 christos
215 1.1 christos /* inferior_exit notifications. */
216 1.1 christos
217 1.1 christos typedef void (observer_inferior_exit_ftype) (struct inferior *inf);
218 1.1 christos
219 1.1 christos extern struct observer *observer_attach_inferior_exit (observer_inferior_exit_ftype *f);
220 1.1 christos extern void observer_detach_inferior_exit (struct observer *observer);
221 1.1 christos extern void observer_notify_inferior_exit (struct inferior *inf);
222 1.1 christos
223 1.1 christos /* inferior_removed notifications. */
224 1.1 christos
225 1.1 christos typedef void (observer_inferior_removed_ftype) (struct inferior *inf);
226 1.1 christos
227 1.1 christos extern struct observer *observer_attach_inferior_removed (observer_inferior_removed_ftype *f);
228 1.1 christos extern void observer_detach_inferior_removed (struct observer *observer);
229 1.1 christos extern void observer_notify_inferior_removed (struct inferior *inf);
230 1.1 christos
231 1.1 christos /* memory_changed notifications. */
232 1.1 christos
233 1.1 christos typedef void (observer_memory_changed_ftype) (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data);
234 1.1 christos
235 1.1 christos extern struct observer *observer_attach_memory_changed (observer_memory_changed_ftype *f);
236 1.1 christos extern void observer_detach_memory_changed (struct observer *observer);
237 1.1 christos extern void observer_notify_memory_changed (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data);
238 1.1 christos
239 1.1 christos /* before_prompt notifications. */
240 1.1 christos
241 1.1 christos typedef void (observer_before_prompt_ftype) (const char *current_prompt);
242 1.1 christos
243 1.1 christos extern struct observer *observer_attach_before_prompt (observer_before_prompt_ftype *f);
244 1.1 christos extern void observer_detach_before_prompt (struct observer *observer);
245 1.1 christos extern void observer_notify_before_prompt (const char *current_prompt);
246 1.1 christos
247 1.1 christos /* gdb_datadir_changed notifications. */
248 1.1 christos
249 1.1 christos typedef void (observer_gdb_datadir_changed_ftype) (void);
250 1.1 christos
251 1.1 christos extern struct observer *observer_attach_gdb_datadir_changed (observer_gdb_datadir_changed_ftype *f);
252 1.1 christos extern void observer_detach_gdb_datadir_changed (struct observer *observer);
253 1.1 christos extern void observer_notify_gdb_datadir_changed (void);
254 1.1 christos
255 1.1 christos /* command_param_changed notifications. */
256 1.1 christos
257 1.1 christos typedef void (observer_command_param_changed_ftype) (const char *param, const char *value);
258 1.1 christos
259 1.1 christos extern struct observer *observer_attach_command_param_changed (observer_command_param_changed_ftype *f);
260 1.1 christos extern void observer_detach_command_param_changed (struct observer *observer);
261 1.1 christos extern void observer_notify_command_param_changed (const char *param, const char *value);
262 1.1 christos
263 1.1 christos /* tsv_created notifications. */
264 1.1 christos
265 1.1 christos typedef void (observer_tsv_created_ftype) (const struct trace_state_variable *tsv);
266 1.1 christos
267 1.1 christos extern struct observer *observer_attach_tsv_created (observer_tsv_created_ftype *f);
268 1.1 christos extern void observer_detach_tsv_created (struct observer *observer);
269 1.1 christos extern void observer_notify_tsv_created (const struct trace_state_variable *tsv);
270 1.1 christos
271 1.1 christos /* tsv_deleted notifications. */
272 1.1 christos
273 1.1 christos typedef void (observer_tsv_deleted_ftype) (const struct trace_state_variable *tsv);
274 1.1 christos
275 1.1 christos extern struct observer *observer_attach_tsv_deleted (observer_tsv_deleted_ftype *f);
276 1.1 christos extern void observer_detach_tsv_deleted (struct observer *observer);
277 1.1 christos extern void observer_notify_tsv_deleted (const struct trace_state_variable *tsv);
278 1.1 christos
279 1.1 christos /* tsv_modified notifications. */
280 1.1 christos
281 1.1 christos typedef void (observer_tsv_modified_ftype) (const struct trace_state_variable *tsv);
282 1.1 christos
283 1.1 christos extern struct observer *observer_attach_tsv_modified (observer_tsv_modified_ftype *f);
284 1.1 christos extern void observer_detach_tsv_modified (struct observer *observer);
285 1.1 christos extern void observer_notify_tsv_modified (const struct trace_state_variable *tsv);
286 1.1 christos
287 1.1 christos /* test_notification notifications. */
288 1.1 christos
289 1.1 christos typedef void (observer_test_notification_ftype) (int somearg);
290 1.1 christos
291 1.1 christos extern struct observer *observer_attach_test_notification (observer_test_notification_ftype *f);
292 1.1 christos extern void observer_detach_test_notification (struct observer *observer);
293 1.1 christos extern void observer_notify_test_notification (int somearg);
294 1.1 christos
295 1.1 christos #endif /* OBSERVER_H */
296