1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
/* GDB Notifications to Observers.
Copyright 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
--
This file was generated using observer.sh and observer.texi. */
/* normal_stop notifications. */
static struct observer_list *normal_stop_subject = NULL;
struct normal_stop_args { struct bpstats *bs; };
static void
observer_normal_stop_notification_stub (const void *data, const void *args_data)
{
observer_normal_stop_ftype *notify = (observer_normal_stop_ftype *) data;
const struct normal_stop_args *args = args_data;
notify (args->bs);
}
struct observer *
observer_attach_normal_stop (observer_normal_stop_ftype *f)
{
return generic_observer_attach (&normal_stop_subject,
&observer_normal_stop_notification_stub,
(void *) f);
}
void
observer_detach_normal_stop (struct observer *observer)
{
generic_observer_detach (&normal_stop_subject, observer);
}
void
observer_notify_normal_stop (struct bpstats *bs)
{
struct normal_stop_args args;
args.bs = bs;
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_normal_stop() called\n");
generic_observer_notify (normal_stop_subject, &args);
}
/* target_changed notifications. */
static struct observer_list *target_changed_subject = NULL;
struct target_changed_args { struct target_ops *target; };
static void
observer_target_changed_notification_stub (const void *data, const void *args_data)
{
observer_target_changed_ftype *notify = (observer_target_changed_ftype *) data;
const struct target_changed_args *args = args_data;
notify (args->target);
}
struct observer *
observer_attach_target_changed (observer_target_changed_ftype *f)
{
return generic_observer_attach (&target_changed_subject,
&observer_target_changed_notification_stub,
(void *) f);
}
void
observer_detach_target_changed (struct observer *observer)
{
generic_observer_detach (&target_changed_subject, observer);
}
void
observer_notify_target_changed (struct target_ops *target)
{
struct target_changed_args args;
args.target = target;
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_target_changed() called\n");
generic_observer_notify (target_changed_subject, &args);
}
/* executable_changed notifications. */
static struct observer_list *executable_changed_subject = NULL;
struct executable_changed_args { void *unused_args; };
static void
observer_executable_changed_notification_stub (const void *data, const void *args_data)
{
observer_executable_changed_ftype *notify = (observer_executable_changed_ftype *) data;
const struct executable_changed_args *args = args_data;
notify (args->unused_args);
}
struct observer *
observer_attach_executable_changed (observer_executable_changed_ftype *f)
{
return generic_observer_attach (&executable_changed_subject,
&observer_executable_changed_notification_stub,
(void *) f);
}
void
observer_detach_executable_changed (struct observer *observer)
{
generic_observer_detach (&executable_changed_subject, observer);
}
void
observer_notify_executable_changed (void *unused_args)
{
struct executable_changed_args args;
args.unused_args = unused_args;
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_executable_changed() called\n");
generic_observer_notify (executable_changed_subject, &args);
}
/* inferior_created notifications. */
static struct observer_list *inferior_created_subject = NULL;
struct inferior_created_args { struct target_ops *objfile; int from_tty; };
static void
observer_inferior_created_notification_stub (const void *data, const void *args_data)
{
observer_inferior_created_ftype *notify = (observer_inferior_created_ftype *) data;
const struct inferior_created_args *args = args_data;
notify (args->objfile, args->from_tty);
}
struct observer *
observer_attach_inferior_created (observer_inferior_created_ftype *f)
{
return generic_observer_attach (&inferior_created_subject,
&observer_inferior_created_notification_stub,
(void *) f);
}
void
observer_detach_inferior_created (struct observer *observer)
{
generic_observer_detach (&inferior_created_subject, observer);
}
void
observer_notify_inferior_created (struct target_ops *objfile, int from_tty)
{
struct inferior_created_args args;
args.objfile = objfile, args.from_tty = from_tty;
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_inferior_created() called\n");
generic_observer_notify (inferior_created_subject, &args);
}
/* solib_loaded notifications. */
static struct observer_list *solib_loaded_subject = NULL;
struct solib_loaded_args { struct so_list *solib; };
static void
observer_solib_loaded_notification_stub (const void *data, const void *args_data)
{
observer_solib_loaded_ftype *notify = (observer_solib_loaded_ftype *) data;
const struct solib_loaded_args *args = args_data;
notify (args->solib);
}
struct observer *
observer_attach_solib_loaded (observer_solib_loaded_ftype *f)
{
return generic_observer_attach (&solib_loaded_subject,
&observer_solib_loaded_notification_stub,
(void *) f);
}
void
observer_detach_solib_loaded (struct observer *observer)
{
generic_observer_detach (&solib_loaded_subject, observer);
}
void
observer_notify_solib_loaded (struct so_list *solib)
{
struct solib_loaded_args args;
args.solib = solib;
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_solib_loaded() called\n");
generic_observer_notify (solib_loaded_subject, &args);
}
/* solib_unloaded notifications. */
static struct observer_list *solib_unloaded_subject = NULL;
struct solib_unloaded_args { struct so_list *solib; };
static void
observer_solib_unloaded_notification_stub (const void *data, const void *args_data)
{
observer_solib_unloaded_ftype *notify = (observer_solib_unloaded_ftype *) data;
const struct solib_unloaded_args *args = args_data;
notify (args->solib);
}
struct observer *
observer_attach_solib_unloaded (observer_solib_unloaded_ftype *f)
{
return generic_observer_attach (&solib_unloaded_subject,
&observer_solib_unloaded_notification_stub,
(void *) f);
}
void
observer_detach_solib_unloaded (struct observer *observer)
{
generic_observer_detach (&solib_unloaded_subject, observer);
}
void
observer_notify_solib_unloaded (struct so_list *solib)
{
struct solib_unloaded_args args;
args.solib = solib;
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_solib_unloaded() called\n");
generic_observer_notify (solib_unloaded_subject, &args);
}
|