diff options
author | Tom Tromey <tom@tromey.com> | 2020-04-13 12:42:59 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-13 14:10:04 -0600 |
commit | e487f9949ab654b20da8ac01b8311ae956136e5e (patch) | |
tree | 8941994b07dea334a3c4583b4c6e868e6391adf5 /gdbserver | |
parent | 400b5eca00033a782467d28b23392b9cf428c2b1 (diff) | |
download | gdb-e487f9949ab654b20da8ac01b8311ae956136e5e.zip gdb-e487f9949ab654b20da8ac01b8311ae956136e5e.tar.gz gdb-e487f9949ab654b20da8ac01b8311ae956136e5e.tar.bz2 |
Implement event-loop glue for gdbserver
event-loop.c requires the client to provide some functions. This
patch implements these functions for gdbserver.
gdbserver/ChangeLog
2020-04-13 Tom Tromey <tom@tromey.com>
* server.c (invoke_async_signal_handlers)
(check_async_event_handlers, flush_streams, gdb_select): New
functions.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdbserver/server.cc | 35 |
2 files changed, 41 insertions, 0 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index b5c428a..309cae3 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,5 +1,11 @@ 2020-04-13 Tom Tromey <tom@tromey.com> + * server.c (invoke_async_signal_handlers) + (check_async_event_handlers, flush_streams, gdb_select): New + functions. + +2020-04-13 Tom Tromey <tom@tromey.com> + * configure: Rebuild. * config.in: Rebuild. diff --git a/gdbserver/server.cc b/gdbserver/server.cc index 43962ad..ac7a7fd 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -47,6 +47,7 @@ #include "gdbsupport/selftest.h" #include "gdbsupport/scope-exit.h" +#include "gdbsupport/gdb_select.h" #define require_running_or_return(BUF) \ if (!target_running ()) \ @@ -4477,6 +4478,40 @@ handle_target_event (int err, gdb_client_data client_data) return 0; } +/* See gdbsupport/event-loop.h. */ + +int +invoke_async_signal_handlers () +{ + return 0; +} + +/* See gdbsupport/event-loop.h. */ + +int +check_async_event_handlers () +{ + return 0; +} + +/* See gdbsupport/errors.h */ + +void +flush_streams () +{ + fflush (stdout); + fflush (stderr); +} + +/* See gdbsupport/gdb_select.h. */ + +int +gdb_select (int n, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout) +{ + return select (n, readfds, writefds, exceptfds, timeout); +} + #if GDB_SELF_TEST namespace selftests { |