Add new timestamped_file class

This adds a "timestamped_file" subclass of ui_file.  This class adds a
timestamp to its output when appropriate.  That is, it follows the
rule already used in vfprintf_unfiltered of adding a timestamp at most
once per write.

The new class is not yet used.
This commit is contained in:
Tom Tromey 2021-12-31 11:44:19 -07:00
parent 8b1931b394
commit 3c6c449e30
4 changed files with 57 additions and 1 deletions

View file

@ -185,6 +185,9 @@ extern int get_chars_per_line ();
extern bool pagination_enabled;
/* A flag indicating whether to timestamp debugging messages. */
extern bool debug_timestamp;
extern struct ui_file **current_ui_gdb_stdout_ptr (void);
extern struct ui_file **current_ui_gdb_stdin_ptr (void);
extern struct ui_file **current_ui_gdb_stderr_ptr (void);