GDB (API)
/home/stan/gdb/linux/gdb/observer.h
Go to the documentation of this file.
00001 /* GDB Notifications to Observers.
00002 
00003    Copyright (C) 2004-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011   
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016   
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 
00020    --
00021 
00022    This file was generated using observer.sh and observer.texi.  */
00023 
00024 #ifndef OBSERVER_H
00025 #define OBSERVER_H
00026 
00027 struct observer;
00028 struct bpstats;
00029 struct so_list;
00030 struct objfile;
00031 struct thread_info;
00032 struct inferior;
00033 struct trace_state_variable;
00034 
00035 /* normal_stop notifications.  */
00036 
00037 typedef void (observer_normal_stop_ftype) (struct bpstats *bs, int print_frame);
00038 
00039 extern struct observer *observer_attach_normal_stop (observer_normal_stop_ftype *f);
00040 extern void observer_detach_normal_stop (struct observer *observer);
00041 extern void observer_notify_normal_stop (struct bpstats *bs, int print_frame);
00042 
00043 /* target_changed notifications.  */
00044 
00045 typedef void (observer_target_changed_ftype) (struct target_ops *target);
00046 
00047 extern struct observer *observer_attach_target_changed (observer_target_changed_ftype *f);
00048 extern void observer_detach_target_changed (struct observer *observer);
00049 extern void observer_notify_target_changed (struct target_ops *target);
00050 
00051 /* executable_changed notifications.  */
00052 
00053 typedef void (observer_executable_changed_ftype) (void);
00054 
00055 extern struct observer *observer_attach_executable_changed (observer_executable_changed_ftype *f);
00056 extern void observer_detach_executable_changed (struct observer *observer);
00057 extern void observer_notify_executable_changed (void);
00058 
00059 /* inferior_created notifications.  */
00060 
00061 typedef void (observer_inferior_created_ftype) (struct target_ops *objfile, int from_tty);
00062 
00063 extern struct observer *observer_attach_inferior_created (observer_inferior_created_ftype *f);
00064 extern void observer_detach_inferior_created (struct observer *observer);
00065 extern void observer_notify_inferior_created (struct target_ops *objfile, int from_tty);
00066 
00067 /* record_changed notifications.  */
00068 
00069 typedef void (observer_record_changed_ftype) (struct inferior *inferior, int started);
00070 
00071 extern struct observer *observer_attach_record_changed (observer_record_changed_ftype *f);
00072 extern void observer_detach_record_changed (struct observer *observer);
00073 extern void observer_notify_record_changed (struct inferior *inferior, int started);
00074 
00075 /* solib_loaded notifications.  */
00076 
00077 typedef void (observer_solib_loaded_ftype) (struct so_list *solib);
00078 
00079 extern struct observer *observer_attach_solib_loaded (observer_solib_loaded_ftype *f);
00080 extern void observer_detach_solib_loaded (struct observer *observer);
00081 extern void observer_notify_solib_loaded (struct so_list *solib);
00082 
00083 /* solib_unloaded notifications.  */
00084 
00085 typedef void (observer_solib_unloaded_ftype) (struct so_list *solib);
00086 
00087 extern struct observer *observer_attach_solib_unloaded (observer_solib_unloaded_ftype *f);
00088 extern void observer_detach_solib_unloaded (struct observer *observer);
00089 extern void observer_notify_solib_unloaded (struct so_list *solib);
00090 
00091 /* new_objfile notifications.  */
00092 
00093 typedef void (observer_new_objfile_ftype) (struct objfile *objfile);
00094 
00095 extern struct observer *observer_attach_new_objfile (observer_new_objfile_ftype *f);
00096 extern void observer_detach_new_objfile (struct observer *observer);
00097 extern void observer_notify_new_objfile (struct objfile *objfile);
00098 
00099 /* new_thread notifications.  */
00100 
00101 typedef void (observer_new_thread_ftype) (struct thread_info *t);
00102 
00103 extern struct observer *observer_attach_new_thread (observer_new_thread_ftype *f);
00104 extern void observer_detach_new_thread (struct observer *observer);
00105 extern void observer_notify_new_thread (struct thread_info *t);
00106 
00107 /* thread_exit notifications.  */
00108 
00109 typedef void (observer_thread_exit_ftype) (struct thread_info *t, int silent);
00110 
00111 extern struct observer *observer_attach_thread_exit (observer_thread_exit_ftype *f);
00112 extern void observer_detach_thread_exit (struct observer *observer);
00113 extern void observer_notify_thread_exit (struct thread_info *t, int silent);
00114 
00115 /* thread_stop_requested notifications.  */
00116 
00117 typedef void (observer_thread_stop_requested_ftype) (ptid_t ptid);
00118 
00119 extern struct observer *observer_attach_thread_stop_requested (observer_thread_stop_requested_ftype *f);
00120 extern void observer_detach_thread_stop_requested (struct observer *observer);
00121 extern void observer_notify_thread_stop_requested (ptid_t ptid);
00122 
00123 /* target_resumed notifications.  */
00124 
00125 typedef void (observer_target_resumed_ftype) (ptid_t ptid);
00126 
00127 extern struct observer *observer_attach_target_resumed (observer_target_resumed_ftype *f);
00128 extern void observer_detach_target_resumed (struct observer *observer);
00129 extern void observer_notify_target_resumed (ptid_t ptid);
00130 
00131 /* about_to_proceed notifications.  */
00132 
00133 typedef void (observer_about_to_proceed_ftype) (void);
00134 
00135 extern struct observer *observer_attach_about_to_proceed (observer_about_to_proceed_ftype *f);
00136 extern void observer_detach_about_to_proceed (struct observer *observer);
00137 extern void observer_notify_about_to_proceed (void);
00138 
00139 /* breakpoint_created notifications.  */
00140 
00141 typedef void (observer_breakpoint_created_ftype) (struct breakpoint *b);
00142 
00143 extern struct observer *observer_attach_breakpoint_created (observer_breakpoint_created_ftype *f);
00144 extern void observer_detach_breakpoint_created (struct observer *observer);
00145 extern void observer_notify_breakpoint_created (struct breakpoint *b);
00146 
00147 /* breakpoint_deleted notifications.  */
00148 
00149 typedef void (observer_breakpoint_deleted_ftype) (struct breakpoint *b);
00150 
00151 extern struct observer *observer_attach_breakpoint_deleted (observer_breakpoint_deleted_ftype *f);
00152 extern void observer_detach_breakpoint_deleted (struct observer *observer);
00153 extern void observer_notify_breakpoint_deleted (struct breakpoint *b);
00154 
00155 /* breakpoint_modified notifications.  */
00156 
00157 typedef void (observer_breakpoint_modified_ftype) (struct breakpoint *b);
00158 
00159 extern struct observer *observer_attach_breakpoint_modified (observer_breakpoint_modified_ftype *f);
00160 extern void observer_detach_breakpoint_modified (struct observer *observer);
00161 extern void observer_notify_breakpoint_modified (struct breakpoint *b);
00162 
00163 /* traceframe_changed notifications.  */
00164 
00165 typedef void (observer_traceframe_changed_ftype) (int tfnum, int tpnum);
00166 
00167 extern struct observer *observer_attach_traceframe_changed (observer_traceframe_changed_ftype *f);
00168 extern void observer_detach_traceframe_changed (struct observer *observer);
00169 extern void observer_notify_traceframe_changed (int tfnum, int tpnum);
00170 
00171 /* architecture_changed notifications.  */
00172 
00173 typedef void (observer_architecture_changed_ftype) (struct gdbarch *newarch);
00174 
00175 extern struct observer *observer_attach_architecture_changed (observer_architecture_changed_ftype *f);
00176 extern void observer_detach_architecture_changed (struct observer *observer);
00177 extern void observer_notify_architecture_changed (struct gdbarch *newarch);
00178 
00179 /* thread_ptid_changed notifications.  */
00180 
00181 typedef void (observer_thread_ptid_changed_ftype) (ptid_t old_ptid, ptid_t new_ptid);
00182 
00183 extern struct observer *observer_attach_thread_ptid_changed (observer_thread_ptid_changed_ftype *f);
00184 extern void observer_detach_thread_ptid_changed (struct observer *observer);
00185 extern void observer_notify_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid);
00186 
00187 /* inferior_added notifications.  */
00188 
00189 typedef void (observer_inferior_added_ftype) (struct inferior *inf);
00190 
00191 extern struct observer *observer_attach_inferior_added (observer_inferior_added_ftype *f);
00192 extern void observer_detach_inferior_added (struct observer *observer);
00193 extern void observer_notify_inferior_added (struct inferior *inf);
00194 
00195 /* inferior_appeared notifications.  */
00196 
00197 typedef void (observer_inferior_appeared_ftype) (struct inferior *inf);
00198 
00199 extern struct observer *observer_attach_inferior_appeared (observer_inferior_appeared_ftype *f);
00200 extern void observer_detach_inferior_appeared (struct observer *observer);
00201 extern void observer_notify_inferior_appeared (struct inferior *inf);
00202 
00203 /* inferior_exit notifications.  */
00204 
00205 typedef void (observer_inferior_exit_ftype) (struct inferior *inf);
00206 
00207 extern struct observer *observer_attach_inferior_exit (observer_inferior_exit_ftype *f);
00208 extern void observer_detach_inferior_exit (struct observer *observer);
00209 extern void observer_notify_inferior_exit (struct inferior *inf);
00210 
00211 /* inferior_removed notifications.  */
00212 
00213 typedef void (observer_inferior_removed_ftype) (struct inferior *inf);
00214 
00215 extern struct observer *observer_attach_inferior_removed (observer_inferior_removed_ftype *f);
00216 extern void observer_detach_inferior_removed (struct observer *observer);
00217 extern void observer_notify_inferior_removed (struct inferior *inf);
00218 
00219 /* memory_changed notifications.  */
00220 
00221 typedef void (observer_memory_changed_ftype) (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data);
00222 
00223 extern struct observer *observer_attach_memory_changed (observer_memory_changed_ftype *f);
00224 extern void observer_detach_memory_changed (struct observer *observer);
00225 extern void observer_notify_memory_changed (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data);
00226 
00227 /* before_prompt notifications.  */
00228 
00229 typedef void (observer_before_prompt_ftype) (const char *current_prompt);
00230 
00231 extern struct observer *observer_attach_before_prompt (observer_before_prompt_ftype *f);
00232 extern void observer_detach_before_prompt (struct observer *observer);
00233 extern void observer_notify_before_prompt (const char *current_prompt);
00234 
00235 /* gdb_datadir_changed notifications.  */
00236 
00237 typedef void (observer_gdb_datadir_changed_ftype) (void);
00238 
00239 extern struct observer *observer_attach_gdb_datadir_changed (observer_gdb_datadir_changed_ftype *f);
00240 extern void observer_detach_gdb_datadir_changed (struct observer *observer);
00241 extern void observer_notify_gdb_datadir_changed (void);
00242 
00243 /* command_param_changed notifications.  */
00244 
00245 typedef void (observer_command_param_changed_ftype) (const char *param, const char *value);
00246 
00247 extern struct observer *observer_attach_command_param_changed (observer_command_param_changed_ftype *f);
00248 extern void observer_detach_command_param_changed (struct observer *observer);
00249 extern void observer_notify_command_param_changed (const char *param, const char *value);
00250 
00251 /* tsv_created notifications.  */
00252 
00253 typedef void (observer_tsv_created_ftype) (const struct trace_state_variable *tsv);
00254 
00255 extern struct observer *observer_attach_tsv_created (observer_tsv_created_ftype *f);
00256 extern void observer_detach_tsv_created (struct observer *observer);
00257 extern void observer_notify_tsv_created (const struct trace_state_variable *tsv);
00258 
00259 /* tsv_deleted notifications.  */
00260 
00261 typedef void (observer_tsv_deleted_ftype) (const struct trace_state_variable *tsv);
00262 
00263 extern struct observer *observer_attach_tsv_deleted (observer_tsv_deleted_ftype *f);
00264 extern void observer_detach_tsv_deleted (struct observer *observer);
00265 extern void observer_notify_tsv_deleted (const struct trace_state_variable *tsv);
00266 
00267 /* tsv_modified notifications.  */
00268 
00269 typedef void (observer_tsv_modified_ftype) (const struct trace_state_variable *tsv);
00270 
00271 extern struct observer *observer_attach_tsv_modified (observer_tsv_modified_ftype *f);
00272 extern void observer_detach_tsv_modified (struct observer *observer);
00273 extern void observer_notify_tsv_modified (const struct trace_state_variable *tsv);
00274 
00275 /* test_notification notifications.  */
00276 
00277 typedef void (observer_test_notification_ftype) (int somearg);
00278 
00279 extern struct observer *observer_attach_test_notification (observer_test_notification_ftype *f);
00280 extern void observer_detach_test_notification (struct observer *observer);
00281 extern void observer_notify_test_notification (int somearg);
00282 
00283 #endif /* OBSERVER_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines