135129Sjb/* This file is automatically generated. DO NOT EDIT! */ 235129Sjb/* Generated from: NetBSD: mknative-gdb,v 1.7 2016/10/16 04:37:42 mrg Exp */ 335129Sjb/* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp */ 435129Sjb 535129Sjb/* GDB Notifications to Observers. 635129Sjb 735129Sjb Copyright (C) 2004-2017 Free Software Foundation, Inc. 835129Sjb 935129Sjb This file is part of GDB. 1035129Sjb 1135129Sjb This program is free software; you can redistribute it and/or modify 1235129Sjb it under the terms of the GNU General Public License as published by 13165968Simp the Free Software Foundation; either version 3 of the License, or 1435129Sjb (at your option) any later version. 1535129Sjb 1635129Sjb This program is distributed in the hope that it will be useful, 1735129Sjb but WITHOUT ANY WARRANTY; without even the implied warranty of 1835129Sjb MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1935129Sjb GNU General Public License for more details. 2035129Sjb 2135129Sjb You should have received a copy of the GNU General Public License 2235129Sjb along with this program. If not, see <http://www.gnu.org/licenses/>. 2335129Sjb 2435129Sjb -- 2535129Sjb 2635129Sjb This file was generated using observer.sh and observer.texi. */ 2735129Sjb 2835129Sjb#ifndef OBSERVER_H 2935129Sjb#define OBSERVER_H 3072373Sdeischen 3172373Sdeischenstruct observer; 3272373Sdeischenstruct bpstats; 3372373Sdeischenstruct so_list; 3472373Sdeischenstruct objfile; 3572373Sdeischenstruct thread_info; 3672373Sdeischenstruct inferior; 3792986Sobrienstruct trace_state_variable; 3892986Sobrien 3992986Sobrien/* normal_stop notifications. */ 4072373Sdeischen 4135129Sjbtypedef void (observer_normal_stop_ftype) (struct bpstats *bs, int print_frame); 4272373Sdeischen 4372373Sdeischenextern struct observer *observer_attach_normal_stop (observer_normal_stop_ftype *f); 4472373Sdeischenextern void observer_detach_normal_stop (struct observer *observer); 4572373Sdeischenextern void observer_notify_normal_stop (struct bpstats *bs, int print_frame); 4635129Sjb 4773254Sdeischen/* signal_received notifications. */ 4873254Sdeischen 4973254Sdeischentypedef void (observer_signal_received_ftype) (enum gdb_signal siggnal); 5035129Sjb 5172373Sdeischenextern struct observer *observer_attach_signal_received (observer_signal_received_ftype *f); 5235129Sjbextern void observer_detach_signal_received (struct observer *observer); 5375368Sdeischenextern void observer_notify_signal_received (enum gdb_signal siggnal); 5475368Sdeischen 5575368Sdeischen/* end_stepping_range notifications. */ 5675368Sdeischen 5735129Sjbtypedef void (observer_end_stepping_range_ftype) (void); 58288031Srodrigc 59288031Srodrigcextern struct observer *observer_attach_end_stepping_range (observer_end_stepping_range_ftype *f); 60288006Srodrigcextern void observer_detach_end_stepping_range (struct observer *observer); 6135129Sjbextern void observer_notify_end_stepping_range (void); 6272373Sdeischen 6335129Sjb/* signal_exited notifications. */ 6472373Sdeischen 6572373Sdeischentypedef void (observer_signal_exited_ftype) (enum gdb_signal siggnal); 66178287Sjhb 67178287Sjhbextern struct observer *observer_attach_signal_exited (observer_signal_exited_ftype *f); 6873254Sdeischenextern void observer_detach_signal_exited (struct observer *observer); 6973254Sdeischenextern void observer_notify_signal_exited (enum gdb_signal siggnal); 7073254Sdeischen 7173254Sdeischen/* exited notifications. */ 7273254Sdeischen 73178287Sjhbtypedef void (observer_exited_ftype) (int exitstatus); 74178287Sjhb 75178287Sjhbextern struct observer *observer_attach_exited (observer_exited_ftype *f); 7672373Sdeischenextern void observer_detach_exited (struct observer *observer); 7735129Sjbextern void observer_notify_exited (int exitstatus); 7835129Sjb 7935129Sjb/* no_history notifications. */ 8072373Sdeischen 8135129Sjbtypedef void (observer_no_history_ftype) (void); 8235129Sjb 8335129Sjbextern struct observer *observer_attach_no_history (observer_no_history_ftype *f); 8435129Sjbextern void observer_detach_no_history (struct observer *observer); 8572373Sdeischenextern void observer_notify_no_history (void); 8635129Sjb 8735129Sjb/* sync_execution_done notifications. */ 8835129Sjb 8972373Sdeischentypedef void (observer_sync_execution_done_ftype) (void); 9035129Sjb 9172373Sdeischenextern struct observer *observer_attach_sync_execution_done (observer_sync_execution_done_ftype *f); 9272373Sdeischenextern void observer_detach_sync_execution_done (struct observer *observer); 9372373Sdeischenextern void observer_notify_sync_execution_done (void); 94178287Sjhb 95178287Sjhb/* command_error notifications. */ 9672373Sdeischen 9773254Sdeischentypedef void (observer_command_error_ftype) (void); 9873254Sdeischen 9972373Sdeischenextern struct observer *observer_attach_command_error (observer_command_error_ftype *f); 100178287Sjhbextern void observer_detach_command_error (struct observer *observer); 101178287Sjhbextern void observer_notify_command_error (void); 102178287Sjhb 10372373Sdeischen/* target_changed notifications. */ 10472373Sdeischen 10572373Sdeischentypedef void (observer_target_changed_ftype) (struct target_ops *target); 10672373Sdeischen 10735129Sjbextern struct observer *observer_attach_target_changed (observer_target_changed_ftype *f); 10835129Sjbextern void observer_detach_target_changed (struct observer *observer); 10972373Sdeischenextern void observer_notify_target_changed (struct target_ops *target); 11072373Sdeischen 11135129Sjb/* executable_changed notifications. */ 11272373Sdeischen 11372373Sdeischentypedef void (observer_executable_changed_ftype) (void); 11472373Sdeischen 11573254Sdeischenextern struct observer *observer_attach_executable_changed (observer_executable_changed_ftype *f); 11672373Sdeischenextern void observer_detach_executable_changed (struct observer *observer); 117178287Sjhbextern void observer_notify_executable_changed (void); 11872373Sdeischen 11972373Sdeischen/* inferior_created notifications. */ 12072373Sdeischen 12172373Sdeischentypedef void (observer_inferior_created_ftype) (struct target_ops *objfile, int from_tty); 122178287Sjhb 12372373Sdeischenextern struct observer *observer_attach_inferior_created (observer_inferior_created_ftype *f); 12472373Sdeischenextern void observer_detach_inferior_created (struct observer *observer); 12572373Sdeischenextern void observer_notify_inferior_created (struct target_ops *objfile, int from_tty); 12672373Sdeischen 12772373Sdeischen/* record_changed notifications. */ 128178287Sjhb 12972373Sdeischentypedef void (observer_record_changed_ftype) (struct inferior *inferior, int started, const char *method, const char *format); 13072373Sdeischen 13172373Sdeischenextern struct observer *observer_attach_record_changed (observer_record_changed_ftype *f); 13272373Sdeischenextern void observer_detach_record_changed (struct observer *observer); 13372373Sdeischenextern void observer_notify_record_changed (struct inferior *inferior, int started, const char *method, const char *format); 134178287Sjhb 135178287Sjhb/* solib_loaded notifications. */ 136178287Sjhb 13772373Sdeischentypedef void (observer_solib_loaded_ftype) (struct so_list *solib); 13872373Sdeischen 13935129Sjbextern struct observer *observer_attach_solib_loaded (observer_solib_loaded_ftype *f); 140extern void observer_detach_solib_loaded (struct observer *observer); 141extern void observer_notify_solib_loaded (struct so_list *solib); 142 143/* solib_unloaded notifications. */ 144 145typedef void (observer_solib_unloaded_ftype) (struct so_list *solib); 146 147extern struct observer *observer_attach_solib_unloaded (observer_solib_unloaded_ftype *f); 148extern void observer_detach_solib_unloaded (struct observer *observer); 149extern void observer_notify_solib_unloaded (struct so_list *solib); 150 151/* new_objfile notifications. */ 152 153typedef void (observer_new_objfile_ftype) (struct objfile *objfile); 154 155extern struct observer *observer_attach_new_objfile (observer_new_objfile_ftype *f); 156extern void observer_detach_new_objfile (struct observer *observer); 157extern void observer_notify_new_objfile (struct objfile *objfile); 158 159/* free_objfile notifications. */ 160 161typedef void (observer_free_objfile_ftype) (struct objfile *objfile); 162 163extern struct observer *observer_attach_free_objfile (observer_free_objfile_ftype *f); 164extern void observer_detach_free_objfile (struct observer *observer); 165extern void observer_notify_free_objfile (struct objfile *objfile); 166 167/* new_thread notifications. */ 168 169typedef void (observer_new_thread_ftype) (struct thread_info *t); 170 171extern struct observer *observer_attach_new_thread (observer_new_thread_ftype *f); 172extern void observer_detach_new_thread (struct observer *observer); 173extern void observer_notify_new_thread (struct thread_info *t); 174 175/* thread_exit notifications. */ 176 177typedef void (observer_thread_exit_ftype) (struct thread_info *t, int silent); 178 179extern struct observer *observer_attach_thread_exit (observer_thread_exit_ftype *f); 180extern void observer_detach_thread_exit (struct observer *observer); 181extern void observer_notify_thread_exit (struct thread_info *t, int silent); 182 183/* thread_stop_requested notifications. */ 184 185typedef void (observer_thread_stop_requested_ftype) (ptid_t ptid); 186 187extern struct observer *observer_attach_thread_stop_requested (observer_thread_stop_requested_ftype *f); 188extern void observer_detach_thread_stop_requested (struct observer *observer); 189extern void observer_notify_thread_stop_requested (ptid_t ptid); 190 191/* target_resumed notifications. */ 192 193typedef void (observer_target_resumed_ftype) (ptid_t ptid); 194 195extern struct observer *observer_attach_target_resumed (observer_target_resumed_ftype *f); 196extern void observer_detach_target_resumed (struct observer *observer); 197extern void observer_notify_target_resumed (ptid_t ptid); 198 199/* about_to_proceed notifications. */ 200 201typedef void (observer_about_to_proceed_ftype) (void); 202 203extern struct observer *observer_attach_about_to_proceed (observer_about_to_proceed_ftype *f); 204extern void observer_detach_about_to_proceed (struct observer *observer); 205extern void observer_notify_about_to_proceed (void); 206 207/* breakpoint_created notifications. */ 208 209typedef void (observer_breakpoint_created_ftype) (struct breakpoint *b); 210 211extern struct observer *observer_attach_breakpoint_created (observer_breakpoint_created_ftype *f); 212extern void observer_detach_breakpoint_created (struct observer *observer); 213extern void observer_notify_breakpoint_created (struct breakpoint *b); 214 215/* breakpoint_deleted notifications. */ 216 217typedef void (observer_breakpoint_deleted_ftype) (struct breakpoint *b); 218 219extern struct observer *observer_attach_breakpoint_deleted (observer_breakpoint_deleted_ftype *f); 220extern void observer_detach_breakpoint_deleted (struct observer *observer); 221extern void observer_notify_breakpoint_deleted (struct breakpoint *b); 222 223/* breakpoint_modified notifications. */ 224 225typedef void (observer_breakpoint_modified_ftype) (struct breakpoint *b); 226 227extern struct observer *observer_attach_breakpoint_modified (observer_breakpoint_modified_ftype *f); 228extern void observer_detach_breakpoint_modified (struct observer *observer); 229extern void observer_notify_breakpoint_modified (struct breakpoint *b); 230 231/* traceframe_changed notifications. */ 232 233typedef void (observer_traceframe_changed_ftype) (int tfnum, int tpnum); 234 235extern struct observer *observer_attach_traceframe_changed (observer_traceframe_changed_ftype *f); 236extern void observer_detach_traceframe_changed (struct observer *observer); 237extern void observer_notify_traceframe_changed (int tfnum, int tpnum); 238 239/* architecture_changed notifications. */ 240 241typedef void (observer_architecture_changed_ftype) (struct gdbarch *newarch); 242 243extern struct observer *observer_attach_architecture_changed (observer_architecture_changed_ftype *f); 244extern void observer_detach_architecture_changed (struct observer *observer); 245extern void observer_notify_architecture_changed (struct gdbarch *newarch); 246 247/* thread_ptid_changed notifications. */ 248 249typedef void (observer_thread_ptid_changed_ftype) (ptid_t old_ptid, ptid_t new_ptid); 250 251extern struct observer *observer_attach_thread_ptid_changed (observer_thread_ptid_changed_ftype *f); 252extern void observer_detach_thread_ptid_changed (struct observer *observer); 253extern void observer_notify_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid); 254 255/* inferior_added notifications. */ 256 257typedef void (observer_inferior_added_ftype) (struct inferior *inf); 258 259extern struct observer *observer_attach_inferior_added (observer_inferior_added_ftype *f); 260extern void observer_detach_inferior_added (struct observer *observer); 261extern void observer_notify_inferior_added (struct inferior *inf); 262 263/* inferior_appeared notifications. */ 264 265typedef void (observer_inferior_appeared_ftype) (struct inferior *inf); 266 267extern struct observer *observer_attach_inferior_appeared (observer_inferior_appeared_ftype *f); 268extern void observer_detach_inferior_appeared (struct observer *observer); 269extern void observer_notify_inferior_appeared (struct inferior *inf); 270 271/* inferior_exit notifications. */ 272 273typedef void (observer_inferior_exit_ftype) (struct inferior *inf); 274 275extern struct observer *observer_attach_inferior_exit (observer_inferior_exit_ftype *f); 276extern void observer_detach_inferior_exit (struct observer *observer); 277extern void observer_notify_inferior_exit (struct inferior *inf); 278 279/* inferior_removed notifications. */ 280 281typedef void (observer_inferior_removed_ftype) (struct inferior *inf); 282 283extern struct observer *observer_attach_inferior_removed (observer_inferior_removed_ftype *f); 284extern void observer_detach_inferior_removed (struct observer *observer); 285extern void observer_notify_inferior_removed (struct inferior *inf); 286 287/* memory_changed notifications. */ 288 289typedef void (observer_memory_changed_ftype) (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data); 290 291extern struct observer *observer_attach_memory_changed (observer_memory_changed_ftype *f); 292extern void observer_detach_memory_changed (struct observer *observer); 293extern void observer_notify_memory_changed (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data); 294 295/* before_prompt notifications. */ 296 297typedef void (observer_before_prompt_ftype) (const char *current_prompt); 298 299extern struct observer *observer_attach_before_prompt (observer_before_prompt_ftype *f); 300extern void observer_detach_before_prompt (struct observer *observer); 301extern void observer_notify_before_prompt (const char *current_prompt); 302 303/* gdb_datadir_changed notifications. */ 304 305typedef void (observer_gdb_datadir_changed_ftype) (void); 306 307extern struct observer *observer_attach_gdb_datadir_changed (observer_gdb_datadir_changed_ftype *f); 308extern void observer_detach_gdb_datadir_changed (struct observer *observer); 309extern void observer_notify_gdb_datadir_changed (void); 310 311/* command_param_changed notifications. */ 312 313typedef void (observer_command_param_changed_ftype) (const char *param, const char *value); 314 315extern struct observer *observer_attach_command_param_changed (observer_command_param_changed_ftype *f); 316extern void observer_detach_command_param_changed (struct observer *observer); 317extern void observer_notify_command_param_changed (const char *param, const char *value); 318 319/* tsv_created notifications. */ 320 321typedef void (observer_tsv_created_ftype) (const struct trace_state_variable *tsv); 322 323extern struct observer *observer_attach_tsv_created (observer_tsv_created_ftype *f); 324extern void observer_detach_tsv_created (struct observer *observer); 325extern void observer_notify_tsv_created (const struct trace_state_variable *tsv); 326 327/* tsv_deleted notifications. */ 328 329typedef void (observer_tsv_deleted_ftype) (const struct trace_state_variable *tsv); 330 331extern struct observer *observer_attach_tsv_deleted (observer_tsv_deleted_ftype *f); 332extern void observer_detach_tsv_deleted (struct observer *observer); 333extern void observer_notify_tsv_deleted (const struct trace_state_variable *tsv); 334 335/* tsv_modified notifications. */ 336 337typedef void (observer_tsv_modified_ftype) (const struct trace_state_variable *tsv); 338 339extern struct observer *observer_attach_tsv_modified (observer_tsv_modified_ftype *f); 340extern void observer_detach_tsv_modified (struct observer *observer); 341extern void observer_notify_tsv_modified (const struct trace_state_variable *tsv); 342 343/* inferior_call_pre notifications. */ 344 345typedef void (observer_inferior_call_pre_ftype) (ptid_t thread, CORE_ADDR address); 346 347extern struct observer *observer_attach_inferior_call_pre (observer_inferior_call_pre_ftype *f); 348extern void observer_detach_inferior_call_pre (struct observer *observer); 349extern void observer_notify_inferior_call_pre (ptid_t thread, CORE_ADDR address); 350 351/* inferior_call_post notifications. */ 352 353typedef void (observer_inferior_call_post_ftype) (ptid_t thread, CORE_ADDR address); 354 355extern struct observer *observer_attach_inferior_call_post (observer_inferior_call_post_ftype *f); 356extern void observer_detach_inferior_call_post (struct observer *observer); 357extern void observer_notify_inferior_call_post (ptid_t thread, CORE_ADDR address); 358 359/* register_changed notifications. */ 360 361typedef void (observer_register_changed_ftype) (struct frame_info *frame, int regnum); 362 363extern struct observer *observer_attach_register_changed (observer_register_changed_ftype *f); 364extern void observer_detach_register_changed (struct observer *observer); 365extern void observer_notify_register_changed (struct frame_info *frame, int regnum); 366 367/* test_notification notifications. */ 368 369typedef void (observer_test_notification_ftype) (int somearg); 370 371extern struct observer *observer_attach_test_notification (observer_test_notification_ftype *f); 372extern void observer_detach_test_notification (struct observer *observer); 373extern void observer_notify_test_notification (int somearg); 374 375/* user_selected_context_changed notifications. */ 376 377typedef void (observer_user_selected_context_changed_ftype) (user_selected_what selection); 378 379extern struct observer *observer_attach_user_selected_context_changed (observer_user_selected_context_changed_ftype *f); 380extern void observer_detach_user_selected_context_changed (struct observer *observer); 381extern void observer_notify_user_selected_context_changed (user_selected_what selection); 382 383#endif /* OBSERVER_H */ 384