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