* defs.h, top.c: Use `extern' in declarations of GUI hooks, and
authorStu Grossman <grossman@cygnus>
Wed, 10 Aug 1994 23:16:40 +0000 (23:16 +0000)
committerStu Grossman <grossman@cygnus>
Wed, 10 Aug 1994 23:16:40 +0000 (23:16 +0000)
define them in top.c.  Add comments to the hooks.

gdb/ChangeLog
gdb/defs.h
gdb/top.c

index 12723b73997a2257389afb7bc2190671399cf34d..2969e67481678c7b047da30bc18d7b50f6d7c5af 100644 (file)
@@ -1,3 +1,8 @@
+Wed Aug 10 16:13:45 1994  Stu Grossman  (grossman@cygnus.com)
+
+       * defs.h, top.c:  Use `extern' in declarations of GUI hooks, and
+       define them in top.c.  Add comments to the hooks.
+
 Wed Aug 10 15:57:43 1994  Doug Evans  (dje@canuck.cygnus.com)
 
        * remote-sim.c (gdbsim_ops): Set `to_insert_breakpoint' and
index 0fd9bf18e3744e616ac17d72f63d04663fdad997..d21c30ebc6810dda188e3af765f3df20be815a80 100644 (file)
@@ -39,14 +39,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 typedef bfd_vma CORE_ADDR;
 
-/* These are supposedly internal to BFD, but in practice are needed
-   all over GDB's readers.  They should be defined in bfd.h (FIXME).  */
-
-bfd_size_type  bfd_read  PARAMS ((PTR ptr, bfd_size_type size,
-                                  bfd_size_type nitems, bfd *abfd));
-int            bfd_seek  PARAMS ((bfd* CONST abfd, CONST file_ptr fp,
-                                  CONST int direction));
-
 #define min(a, b) ((a) < (b) ? (a) : (b))
 #define max(a, b) ((a) > (b) ? (a) : (b))
 
@@ -837,17 +829,17 @@ struct symtab;
 struct breakpoint;
 #endif
 
-void (*init_ui_hook) PARAMS ((void));
-void (*command_loop_hook) PARAMS ((void));
-void (*fputs_unfiltered_hook) PARAMS ((const char *linebuffer));
-void (*print_frame_info_listing_hook) PARAMS ((struct symtab *s, int line,
+extern void (*init_ui_hook) PARAMS ((void));
+extern void (*command_loop_hook) PARAMS ((void));
+extern void (*fputs_unfiltered_hook) PARAMS ((const char *linebuffer));
+extern void (*print_frame_info_listing_hook) PARAMS ((struct symtab *s, int line,
                                               int stopline, int noerror));
-int (*query_hook) PARAMS (());
-void (*flush_hook) PARAMS ((FILE *stream));
-void (*create_breakpoint_hook) PARAMS ((struct breakpoint *b));
-void (*delete_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
-void (*enable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
-void (*disable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
+extern int (*query_hook) PARAMS (());
+extern void (*flush_hook) PARAMS ((FILE *stream));
+extern void (*create_breakpoint_hook) PARAMS ((struct breakpoint *b));
+extern void (*delete_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
+extern void (*enable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
+extern void (*disable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
 
 /* Inhibit window interface if non-zero. */
 
index 75acd4a337e939a63555077d25cbc22e8d5f4534..27616aeca7ac7505c9e3aab7d76d92ed6303afd6 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -317,6 +317,42 @@ static void stop_sig PARAMS ((int));
 #if 0 == (HAVE_SIGSETMASK)
 #define sigsetmask(n)
 #endif
+
+/* Hooks for alternate command interfaces.  */
+
+/* Called after most modules have been initialized, but before taking users
+   command file.  */
+
+void (*init_ui_hook) PARAMS ((void));
+
+/* Called instead of command_loop at top level.  Can be invoked via
+   return_to_top_level.  */
+
+void (*command_loop_hook) PARAMS ((void));
+
+/* Called instead of fputs for all output.  */
+
+void (*fputs_unfiltered_hook) PARAMS ((const char *linebuffer));
+
+/* Called from print_frame_info to list the line we stopped in.  */
+
+void (*print_frame_info_listing_hook) PARAMS ((struct symtab *s, int line,
+                                              int stopline, int noerror));
+/* Replaces most of query.  */
+
+int (*query_hook) PARAMS (());
+
+/* Called from gdb_flush to flush output.  */
+
+void (*flush_hook) PARAMS ((FILE *stream));
+
+/* Called as appropriate to notify the interface of the specified breakpoint
+   conditions.  */
+
+void (*create_breakpoint_hook) PARAMS ((struct breakpoint *b));
+void (*delete_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
+void (*enable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
+void (*disable_breakpoint_hook) PARAMS ((struct breakpoint *bpt));
 \f
 /* Where to go for return_to_top_level (RETURN_ERROR).  */
 jmp_buf error_return;
This page took 0.029902 seconds and 4 git commands to generate.