aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-04-13 12:42:59 -0600
committerTom Tromey <tromey@adacore.com>2020-04-13 14:10:04 -0600
commitc1cd3163d99efe4f7cbe7f228859fd93f28e06bb (patch)
treef2d1b73cc5091ec29f88ea2ba2ad82002650c73d /gdbsupport
parent29f2bf4f224c7b6a02b4acc3e1c22fd776dbc013 (diff)
downloadgdb-c1cd3163d99efe4f7cbe7f228859fd93f28e06bb.zip
gdb-c1cd3163d99efe4f7cbe7f228859fd93f28e06bb.tar.gz
gdb-c1cd3163d99efe4f7cbe7f228859fd93f28e06bb.tar.bz2
Introduce and use flush_streams
Code in gdbsupport can't call gdb_flush, so this introduces a new "flush_streams" function that must be supplied by the client. Note that the similar gdb_flush_out_err exists, but it isn't defined in quite the same way, so it wasn't clear to me whether the two could be merged. gdb/ChangeLog 2020-04-13 Tom Tromey <tom@tromey.com> * utils.c (flush_streams): New function. * event-loop.c (gdb_wait_for_event): Call flush_streams. gdbsupport/ChangeLog 2020-04-13 Tom Tromey <tom@tromey.com> * errors.h (flush_streams): Declare.
Diffstat (limited to 'gdbsupport')
-rw-r--r--gdbsupport/ChangeLog4
-rw-r--r--gdbsupport/errors.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index 880a6ae..a065a9a 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,5 +1,9 @@
2020-04-13 Tom Tromey <tom@tromey.com>
+ * errors.h (flush_streams): Declare.
+
+2020-04-13 Tom Tromey <tom@tromey.com>
+
* gdb_select.h: Move from ../gdb/.
2020-04-13 Tom Tromey <tom@tromey.com>
diff --git a/gdbsupport/errors.h b/gdbsupport/errors.h
index da13482..f8f6c15 100644
--- a/gdbsupport/errors.h
+++ b/gdbsupport/errors.h
@@ -87,4 +87,8 @@ extern void perror_with_name (const char *string) ATTRIBUTE_NORETURN;
extern void malloc_failure (long size) ATTRIBUTE_NORETURN;
+/* Flush stdout and stderr. Must be provided by the client. */
+
+extern void flush_streams ();
+
#endif /* COMMON_ERRORS_H */