diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-08-16 19:57:19 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-08-16 19:57:19 +0000 |
commit | 7be570e7ce77920e2e628a03bdfe2d295fc2568f (patch) | |
tree | a49512270bb021f1d5171b362dc973e28c97ca94 /gdb/event-loop.c | |
parent | ed288bb597072176e84fc8279707a3f2f475779b (diff) | |
download | gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.zip gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.gz gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.bz2 |
import gdb-1999-08-16 snapshot
Diffstat (limited to 'gdb/event-loop.c')
-rw-r--r-- | gdb/event-loop.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/event-loop.c b/gdb/event-loop.c index 4d35ed7..78ecb63 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -120,7 +120,7 @@ sighandler_list; function. */ static int async_handler_ready = 0; -static void create_file_handler PARAMS ((int, int, file_handler_func *, gdb_client_data)); +static void create_file_handler PARAMS ((int, int, handler_func *, gdb_client_data)); static void invoke_async_signal_handler PARAMS ((void)); static int gdb_wait_for_event PARAMS ((void)); static int gdb_do_one_event PARAMS ((void)); @@ -318,13 +318,13 @@ start_event_loop () void add_file_handler (fd, proc, client_data) int fd; - file_handler_func *proc; + void (*proc) (void); gdb_client_data client_data; { #ifdef HAVE_POLL - create_file_handler (fd, POLLIN, (file_handler_func *) proc, client_data); + create_file_handler (fd, POLLIN, (handler_func *) proc, client_data); #else - create_file_handler (fd, GDB_READABLE, (file_handler_func *) proc, client_data); + create_file_handler (fd, GDB_READABLE, (handler_func *) proc, client_data); #endif } @@ -342,7 +342,7 @@ static void create_file_handler (fd, mask, proc, client_data) int fd; int mask; - file_handler_func *proc; + handler_func *proc; gdb_client_data client_data; { file_handler *file_ptr; @@ -556,7 +556,7 @@ handle_file_event (event_file_desc) /* If there was a match, then call the handler. */ if (mask != 0) - (*file_ptr->proc) (file_ptr->client_data, mask); + (*file_ptr->proc) (file_ptr->client_data); break; } } @@ -581,6 +581,10 @@ gdb_wait_for_event () int mask, bit, index; #endif + /* Make sure all output is done before getting another event. */ + gdb_flush (gdb_stdout); + gdb_flush (gdb_stderr); + if (gdb_notifier.num_fds == 0) return -1; @@ -689,7 +693,7 @@ gdb_wait_for_event () whenever the handler is invoked. */ async_signal_handler * create_async_signal_handler (proc, client_data) - async_handler_func *proc; + handler_func *proc; gdb_client_data client_data; { async_signal_handler *async_handler_ptr; |