49 void putstr (const
char *str,
int quoter);
54 void putstrn (const
char *str,
int n,
int quoter,
bool async_safe = false);
63 virtual
void write (const
char *buf,
long length_buf) = 0;
72 { gdb_assert_not_reached (
"write_async_safe"); }
76 virtual void puts (
const char *str)
77 { this->
write (str, strlen (str)); }
79 virtual long read (
char *buf,
long length_buf)
80 { gdb_assert_not_reached (
"can't read from this file type"); }
101 virtual int fd ()
const
147 void printchar (
int c,
int quoter,
bool async_safe);
157 void write (
const char *buf,
long length_buf)
override;
159 void puts (
const char *str)
override;
186 void write (
const char *buf,
long length_buf)
override;
188 long read (
char *buf,
long length_buf)
override
189 { gdb_assert_not_reached (
"a string_file is not readable"); }
206 std::string ret = std::move (
m_string);
245 explicit stdio_file (FILE *file,
bool close_p =
false);
256 bool open (
const char *
name,
const char *mode);
258 void flush ()
override;
260 void write (
const char *buf,
long length_buf)
override;
264 void puts (
const char *)
override;
266 long read (
char *buf,
long length_buf)
override;
273 int fd ()
const override
327 void write (
const char *buf,
long length_buf)
override;
328 void puts (
const char *linebuffer)
override;
341 void write (
const char *buf,
long length_buf)
override;
343 void puts (
const char *)
override;
348 void flush ()
override;
386 void write (
const char *buf,
long length_buf)
override;
387 void puts (
const char *linebuffer)
override;
426 int fd ()
const override
462 void write (
const char *buf,
long len)
override;
void write(const char *buf, long length_buf) override
void puts(const char *linebuffer) override
void reset_style() override
no_terminal_escape_file()
void emit_style_escape(const ui_file_style &style) override
void write(const char *buf, long length_buf) override
void write_async_safe(const char *buf, long sizeof_buf) override
void puts(const char *str) override
void puts(const char *linebuffer) override
void write(const char *buf, long length_buf) override
stderr_file(FILE *stream)
void puts(const char *) override
void write(const char *buf, long length_buf) override
bool open(const char *name, const char *mode)
void set_stream(FILE *file)
void write_async_safe(const char *buf, long length_buf) override
bool can_emit_style_escape() override
long read(char *buf, long length_buf) override
long read(char *buf, long length_buf) override
void write(const char *buf, long length_buf) override
bool can_emit_style_escape() override
const char * c_str() const
string_file(string_file &&other)=default
string_file(bool term_out)
const char * data() const
const std::string & string()
string_file & operator=(std::string &&str)
void reset_style() override
void emit_style_escape(const ui_file_style &style) override
void puts_unfiltered(const char *str) override
bool can_emit_style_escape() override
void write(const char *buf, long length_buf) override
void write_async_safe(const char *buf, long length_buf) override
tee_file(ui_file *one, ui_file *two)
void puts(const char *) override
timestamped_file(ui_file *stream)
DISABLE_COPY_AND_ASSIGN(timestamped_file)
void write(const char *buf, long len) override
virtual void write_async_safe(const char *buf, long length_buf)
virtual bool can_emit_style_escape()
void putstrn(const char *str, int n, int quoter, bool async_safe=false)
virtual void puts(const char *str)
void virtual void write(const char *buf, long length_buf)=0
void vprintf(const char *, va_list) ATTRIBUTE_PRINTF(2
virtual void emit_style_escape(const ui_file_style &style)
void void putstr(const char *str, int quoter)
virtual void reset_style()
void printf(const char *,...) ATTRIBUTE_PRINTF(2
virtual void wrap_here(int indent)
void printchar(int c, int quoter, bool async_safe)
ui_file_style m_applied_style
ui_file(ui_file &&other)=default
virtual void puts_unfiltered(const char *str)
virtual long read(char *buf, long length_buf)
void write_async_safe(const char *buf, long length_buf) override
void puts_unfiltered(const char *str) override
bool can_emit_style_escape() override
wrapped_file(ui_file *stream)
void emit_style_escape(const ui_file_style &style) override
void reset_style() override
void wrap_here(int indent) override
static void ATTRIBUTE_PRINTF(1, 0)
std::unique_ptr< stdio_file > stdio_file_up
std::unique_ptr< ui_file > ui_file_up
int gdb_console_fputs(const char *, FILE *)