diff options
Diffstat (limited to 'gdb/ui-file.h')
-rw-r--r-- | gdb/ui-file.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ui-file.h b/gdb/ui-file.h index 6150973..9593c94 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -83,6 +83,11 @@ public: virtual void flush () {} + + /* If this object has an underlying file descriptor, then return it. + Otherwise, return -1. */ + virtual int fd () const + { return -1; } }; typedef std::unique_ptr<ui_file> ui_file_up; @@ -195,6 +200,10 @@ public: bool can_emit_style_escape () override; + /* Return the underlying file descriptor. */ + int fd () const override + { return m_fd; } + private: /* Sets the internal stream to FILE, and saves the FILE's file descriptor in M_FD. */ |