gdb/observer.h - gdb

Data types defined

Macros defined

Source code

  1. /* GDB Notifications to Observers.

  2.    Copyright (C) 2004-2014 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.

  14.    --

  15.    This file was generated using observer.sh and observer.texi.  */

  16. #ifndef OBSERVER_H
  17. #define OBSERVER_H

  18. struct observer;
  19. struct bpstats;
  20. struct so_list;
  21. struct objfile;
  22. struct thread_info;
  23. struct inferior;
  24. struct trace_state_variable;

  25. /* normal_stop notifications.  */

  26. typedef void (observer_normal_stop_ftype) (struct bpstats *bs, int print_frame);

  27. extern struct observer *observer_attach_normal_stop (observer_normal_stop_ftype *f);
  28. extern void observer_detach_normal_stop (struct observer *observer);
  29. extern void observer_notify_normal_stop (struct bpstats *bs, int print_frame);

  30. /* signal_received notifications.  */

  31. typedef void (observer_signal_received_ftype) (enum gdb_signal siggnal);

  32. extern struct observer *observer_attach_signal_received (observer_signal_received_ftype *f);
  33. extern void observer_detach_signal_received (struct observer *observer);
  34. extern void observer_notify_signal_received (enum gdb_signal siggnal);

  35. /* end_stepping_range notifications.  */

  36. typedef void (observer_end_stepping_range_ftype) (void);

  37. extern struct observer *observer_attach_end_stepping_range (observer_end_stepping_range_ftype *f);
  38. extern void observer_detach_end_stepping_range (struct observer *observer);
  39. extern void observer_notify_end_stepping_range (void);

  40. /* signal_exited notifications.  */

  41. typedef void (observer_signal_exited_ftype) (enum gdb_signal siggnal);

  42. extern struct observer *observer_attach_signal_exited (observer_signal_exited_ftype *f);
  43. extern void observer_detach_signal_exited (struct observer *observer);
  44. extern void observer_notify_signal_exited (enum gdb_signal siggnal);

  45. /* exited notifications.  */

  46. typedef void (observer_exited_ftype) (int exitstatus);

  47. extern struct observer *observer_attach_exited (observer_exited_ftype *f);
  48. extern void observer_detach_exited (struct observer *observer);
  49. extern void observer_notify_exited (int exitstatus);

  50. /* no_history notifications.  */

  51. typedef void (observer_no_history_ftype) (void);

  52. extern struct observer *observer_attach_no_history (observer_no_history_ftype *f);
  53. extern void observer_detach_no_history (struct observer *observer);
  54. extern void observer_notify_no_history (void);

  55. /* sync_execution_done notifications.  */

  56. typedef void (observer_sync_execution_done_ftype) (void);

  57. extern struct observer *observer_attach_sync_execution_done (observer_sync_execution_done_ftype *f);
  58. extern void observer_detach_sync_execution_done (struct observer *observer);
  59. extern void observer_notify_sync_execution_done (void);

  60. /* command_error notifications.  */

  61. typedef void (observer_command_error_ftype) (void);

  62. extern struct observer *observer_attach_command_error (observer_command_error_ftype *f);
  63. extern void observer_detach_command_error (struct observer *observer);
  64. extern void observer_notify_command_error (void);

  65. /* target_changed notifications.  */

  66. typedef void (observer_target_changed_ftype) (struct target_ops *target);

  67. extern struct observer *observer_attach_target_changed (observer_target_changed_ftype *f);
  68. extern void observer_detach_target_changed (struct observer *observer);
  69. extern void observer_notify_target_changed (struct target_ops *target);

  70. /* executable_changed notifications.  */

  71. typedef void (observer_executable_changed_ftype) (void);

  72. extern struct observer *observer_attach_executable_changed (observer_executable_changed_ftype *f);
  73. extern void observer_detach_executable_changed (struct observer *observer);
  74. extern void observer_notify_executable_changed (void);

  75. /* inferior_created notifications.  */

  76. typedef void (observer_inferior_created_ftype) (struct target_ops *objfile, int from_tty);

  77. extern struct observer *observer_attach_inferior_created (observer_inferior_created_ftype *f);
  78. extern void observer_detach_inferior_created (struct observer *observer);
  79. extern void observer_notify_inferior_created (struct target_ops *objfile, int from_tty);

  80. /* record_changed notifications.  */

  81. typedef void (observer_record_changed_ftype) (struct inferior *inferior, int started);

  82. extern struct observer *observer_attach_record_changed (observer_record_changed_ftype *f);
  83. extern void observer_detach_record_changed (struct observer *observer);
  84. extern void observer_notify_record_changed (struct inferior *inferior, int started);

  85. /* solib_loaded notifications.  */

  86. typedef void (observer_solib_loaded_ftype) (struct so_list *solib);

  87. extern struct observer *observer_attach_solib_loaded (observer_solib_loaded_ftype *f);
  88. extern void observer_detach_solib_loaded (struct observer *observer);
  89. extern void observer_notify_solib_loaded (struct so_list *solib);

  90. /* solib_unloaded notifications.  */

  91. typedef void (observer_solib_unloaded_ftype) (struct so_list *solib);

  92. extern struct observer *observer_attach_solib_unloaded (observer_solib_unloaded_ftype *f);
  93. extern void observer_detach_solib_unloaded (struct observer *observer);
  94. extern void observer_notify_solib_unloaded (struct so_list *solib);

  95. /* new_objfile notifications.  */

  96. typedef void (observer_new_objfile_ftype) (struct objfile *objfile);

  97. extern struct observer *observer_attach_new_objfile (observer_new_objfile_ftype *f);
  98. extern void observer_detach_new_objfile (struct observer *observer);
  99. extern void observer_notify_new_objfile (struct objfile *objfile);

  100. /* free_objfile notifications.  */

  101. typedef void (observer_free_objfile_ftype) (struct objfile *objfile);

  102. extern struct observer *observer_attach_free_objfile (observer_free_objfile_ftype *f);
  103. extern void observer_detach_free_objfile (struct observer *observer);
  104. extern void observer_notify_free_objfile (struct objfile *objfile);

  105. /* new_thread notifications.  */

  106. typedef void (observer_new_thread_ftype) (struct thread_info *t);

  107. extern struct observer *observer_attach_new_thread (observer_new_thread_ftype *f);
  108. extern void observer_detach_new_thread (struct observer *observer);
  109. extern void observer_notify_new_thread (struct thread_info *t);

  110. /* thread_exit notifications.  */

  111. typedef void (observer_thread_exit_ftype) (struct thread_info *t, int silent);

  112. extern struct observer *observer_attach_thread_exit (observer_thread_exit_ftype *f);
  113. extern void observer_detach_thread_exit (struct observer *observer);
  114. extern void observer_notify_thread_exit (struct thread_info *t, int silent);

  115. /* thread_stop_requested notifications.  */

  116. typedef void (observer_thread_stop_requested_ftype) (ptid_t ptid);

  117. extern struct observer *observer_attach_thread_stop_requested (observer_thread_stop_requested_ftype *f);
  118. extern void observer_detach_thread_stop_requested (struct observer *observer);
  119. extern void observer_notify_thread_stop_requested (ptid_t ptid);

  120. /* target_resumed notifications.  */

  121. typedef void (observer_target_resumed_ftype) (ptid_t ptid);

  122. extern struct observer *observer_attach_target_resumed (observer_target_resumed_ftype *f);
  123. extern void observer_detach_target_resumed (struct observer *observer);
  124. extern void observer_notify_target_resumed (ptid_t ptid);

  125. /* about_to_proceed notifications.  */

  126. typedef void (observer_about_to_proceed_ftype) (void);

  127. extern struct observer *observer_attach_about_to_proceed (observer_about_to_proceed_ftype *f);
  128. extern void observer_detach_about_to_proceed (struct observer *observer);
  129. extern void observer_notify_about_to_proceed (void);

  130. /* breakpoint_created notifications.  */

  131. typedef void (observer_breakpoint_created_ftype) (struct breakpoint *b);

  132. extern struct observer *observer_attach_breakpoint_created (observer_breakpoint_created_ftype *f);
  133. extern void observer_detach_breakpoint_created (struct observer *observer);
  134. extern void observer_notify_breakpoint_created (struct breakpoint *b);

  135. /* breakpoint_deleted notifications.  */

  136. typedef void (observer_breakpoint_deleted_ftype) (struct breakpoint *b);

  137. extern struct observer *observer_attach_breakpoint_deleted (observer_breakpoint_deleted_ftype *f);
  138. extern void observer_detach_breakpoint_deleted (struct observer *observer);
  139. extern void observer_notify_breakpoint_deleted (struct breakpoint *b);

  140. /* breakpoint_modified notifications.  */

  141. typedef void (observer_breakpoint_modified_ftype) (struct breakpoint *b);

  142. extern struct observer *observer_attach_breakpoint_modified (observer_breakpoint_modified_ftype *f);
  143. extern void observer_detach_breakpoint_modified (struct observer *observer);
  144. extern void observer_notify_breakpoint_modified (struct breakpoint *b);

  145. /* traceframe_changed notifications.  */

  146. typedef void (observer_traceframe_changed_ftype) (int tfnum, int tpnum);

  147. extern struct observer *observer_attach_traceframe_changed (observer_traceframe_changed_ftype *f);
  148. extern void observer_detach_traceframe_changed (struct observer *observer);
  149. extern void observer_notify_traceframe_changed (int tfnum, int tpnum);

  150. /* architecture_changed notifications.  */

  151. typedef void (observer_architecture_changed_ftype) (struct gdbarch *newarch);

  152. extern struct observer *observer_attach_architecture_changed (observer_architecture_changed_ftype *f);
  153. extern void observer_detach_architecture_changed (struct observer *observer);
  154. extern void observer_notify_architecture_changed (struct gdbarch *newarch);

  155. /* thread_ptid_changed notifications.  */

  156. typedef void (observer_thread_ptid_changed_ftype) (ptid_t old_ptid, ptid_t new_ptid);

  157. extern struct observer *observer_attach_thread_ptid_changed (observer_thread_ptid_changed_ftype *f);
  158. extern void observer_detach_thread_ptid_changed (struct observer *observer);
  159. extern void observer_notify_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid);

  160. /* inferior_added notifications.  */

  161. typedef void (observer_inferior_added_ftype) (struct inferior *inf);

  162. extern struct observer *observer_attach_inferior_added (observer_inferior_added_ftype *f);
  163. extern void observer_detach_inferior_added (struct observer *observer);
  164. extern void observer_notify_inferior_added (struct inferior *inf);

  165. /* inferior_appeared notifications.  */

  166. typedef void (observer_inferior_appeared_ftype) (struct inferior *inf);

  167. extern struct observer *observer_attach_inferior_appeared (observer_inferior_appeared_ftype *f);
  168. extern void observer_detach_inferior_appeared (struct observer *observer);
  169. extern void observer_notify_inferior_appeared (struct inferior *inf);

  170. /* inferior_exit notifications.  */

  171. typedef void (observer_inferior_exit_ftype) (struct inferior *inf);

  172. extern struct observer *observer_attach_inferior_exit (observer_inferior_exit_ftype *f);
  173. extern void observer_detach_inferior_exit (struct observer *observer);
  174. extern void observer_notify_inferior_exit (struct inferior *inf);

  175. /* inferior_removed notifications.  */

  176. typedef void (observer_inferior_removed_ftype) (struct inferior *inf);

  177. extern struct observer *observer_attach_inferior_removed (observer_inferior_removed_ftype *f);
  178. extern void observer_detach_inferior_removed (struct observer *observer);
  179. extern void observer_notify_inferior_removed (struct inferior *inf);

  180. /* memory_changed notifications.  */

  181. typedef void (observer_memory_changed_ftype) (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data);

  182. extern struct observer *observer_attach_memory_changed (observer_memory_changed_ftype *f);
  183. extern void observer_detach_memory_changed (struct observer *observer);
  184. extern void observer_notify_memory_changed (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data);

  185. /* before_prompt notifications.  */

  186. typedef void (observer_before_prompt_ftype) (const char *current_prompt);

  187. extern struct observer *observer_attach_before_prompt (observer_before_prompt_ftype *f);
  188. extern void observer_detach_before_prompt (struct observer *observer);
  189. extern void observer_notify_before_prompt (const char *current_prompt);

  190. /* gdb_datadir_changed notifications.  */

  191. typedef void (observer_gdb_datadir_changed_ftype) (void);

  192. extern struct observer *observer_attach_gdb_datadir_changed (observer_gdb_datadir_changed_ftype *f);
  193. extern void observer_detach_gdb_datadir_changed (struct observer *observer);
  194. extern void observer_notify_gdb_datadir_changed (void);

  195. /* command_param_changed notifications.  */

  196. typedef void (observer_command_param_changed_ftype) (const char *param, const char *value);

  197. extern struct observer *observer_attach_command_param_changed (observer_command_param_changed_ftype *f);
  198. extern void observer_detach_command_param_changed (struct observer *observer);
  199. extern void observer_notify_command_param_changed (const char *param, const char *value);

  200. /* tsv_created notifications.  */

  201. typedef void (observer_tsv_created_ftype) (const struct trace_state_variable *tsv);

  202. extern struct observer *observer_attach_tsv_created (observer_tsv_created_ftype *f);
  203. extern void observer_detach_tsv_created (struct observer *observer);
  204. extern void observer_notify_tsv_created (const struct trace_state_variable *tsv);

  205. /* tsv_deleted notifications.  */

  206. typedef void (observer_tsv_deleted_ftype) (const struct trace_state_variable *tsv);

  207. extern struct observer *observer_attach_tsv_deleted (observer_tsv_deleted_ftype *f);
  208. extern void observer_detach_tsv_deleted (struct observer *observer);
  209. extern void observer_notify_tsv_deleted (const struct trace_state_variable *tsv);

  210. /* tsv_modified notifications.  */

  211. typedef void (observer_tsv_modified_ftype) (const struct trace_state_variable *tsv);

  212. extern struct observer *observer_attach_tsv_modified (observer_tsv_modified_ftype *f);
  213. extern void observer_detach_tsv_modified (struct observer *observer);
  214. extern void observer_notify_tsv_modified (const struct trace_state_variable *tsv);

  215. /* test_notification notifications.  */

  216. typedef void (observer_test_notification_ftype) (int somearg);

  217. extern struct observer *observer_attach_test_notification (observer_test_notification_ftype *f);
  218. extern void observer_detach_test_notification (struct observer *observer);
  219. extern void observer_notify_test_notification (int somearg);

  220. #endif /* OBSERVER_H */