#!/bin/sh
# User Interface Events.
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999-2000 Free Software Foundation, Inc.
#
# Contributed by Cygnus Solutions.
#
#*:void:target_wait_loop_hook:void
#*:void:init_gdb_hook:char *argv0:argv0
#*:void:command_loop_hook:void
-#*:void:fputs_unfiltered_hook:const char *linebuff,GDB_FILE *stream:linebuff, stream
+#*:void:fputs_unfiltered_hook:const char *linebuff,struct ui_file *stream:linebuff, stream
#*:void:print_frame_info_listing_hook:struct symtab *s, int line, int stopline, int noerror:s, line, stopline, noerror
#*:int:query_hook:const char *query, va_list args:query, args
#*:void:warning_hook:const char *string, va_list args:string, args
echo ""
cat <<EOF
/* Interface into events functions.
- Where a *_p() predicate is present, it must called before calling
- the hook proper. */
+ Where a *_p() predicate is present, it must be called before
+ calling the hook proper. */
EOF
function_list | while eval read $read
do
cat <<EOF
/* Install custom gdb-events hooks. */
-extern void set_gdb_event_hooks (struct gdb_events *vector);
+extern struct gdb_events *set_gdb_event_hooks (struct gdb_events *vector);
/* Deliver any pending events. */
extern void gdb_events_deliver (struct gdb_events *vector);
echo ""
cat <<EOF
#if WITH_GDB_EVENTS
-void
+struct gdb_events *
set_gdb_event_hooks (struct gdb_events *vector)
{
+ struct gdb_events *old_events = current_event_hooks;
if (vector == NULL)
current_event_hooks = &queue_event_hooks;
else
current_event_hooks = vector;
+ return old_events;
EOF
function_list | while eval read $read
do