|
LLDB mainline
|
#include <File.h>
Classes | |
| struct | Options |
Public Member Functions | |
| bool | IsValid () const override |
| IsValid. | |
| Status | Close () override |
| Flush any buffers and release any resources owned by the file. | |
| bool | isA (const void *classID) const override |
| Public Member Functions inherited from lldb_private::NativeFile | |
| NativeFile () | |
| NativeFile (FILE *fh, bool transfer_ownership) | |
| NativeFile (int fd, OpenOptions options, bool transfer_ownership) | |
| ~NativeFile () override | |
| Status | Read (void *buf, size_t &num_bytes) override |
| Read bytes from a file from the current file position into buf. | |
| Status | Write (const void *buf, size_t &num_bytes) override |
| Write bytes from buf to a file at the current file position. | |
| WaitableHandle | GetWaitableHandle () override |
| Get a handle that can be used for OS polling interfaces, such as WaitForMultipleObjects, select, or epoll. | |
| Status | GetFileSpec (FileSpec &file_spec) const override |
| Get the file specification for this file, if possible. | |
| int | GetDescriptor () const override |
| Get underlying OS file descriptor for this file, or kInvalidDescriptor. | |
| FILE * | GetStream () override |
| Get the underlying libc stream for this file, or NULL. | |
| off_t | SeekFromStart (off_t offset, Status *error_ptr=nullptr) override |
| Seek to an offset relative to the beginning of the file. | |
| off_t | SeekFromCurrent (off_t offset, Status *error_ptr=nullptr) override |
| Seek to an offset relative to the current file position. | |
| off_t | SeekFromEnd (off_t offset, Status *error_ptr=nullptr) override |
| Seek to an offset relative to the end of the file. | |
| Status | Read (void *dst, size_t &num_bytes, off_t &offset) override |
| Read bytes from a file from the specified file offset. | |
| Status | Write (const void *src, size_t &num_bytes, off_t &offset) override |
| Write bytes to a file at the specified file offset. | |
| Status | Flush () override |
| Flush the current stream. | |
| Status | Sync () override |
| Sync to disk. | |
| size_t | PrintfVarArg (const char *format, va_list args) override |
| Output printf formatted output to the stream. | |
| llvm::Expected< OpenOptions > | GetOptions () const override |
| Return the OpenOptions for this file. | |
| Public Member Functions inherited from lldb_private::File | |
| File () | |
| size_t | Printf (const char *format,...) __attribute__((format(printf |
| Output printf formatted output to the stream. | |
| llvm::Expected< const char * > | GetOpenMode () const |
| uint32_t | GetPermissions (Status &error) const |
| Get the permissions for a this file. | |
| bool | GetIsInteractive () |
| Return true if this file is interactive. | |
| bool | GetIsRealTerminal () |
| Return true if this file from a real terminal. | |
| bool | GetIsTerminalWithColors () |
| Return true if this file is a terminal which supports colors. | |
| operator bool () const | |
| bool | operator! () const |
| Public Member Functions inherited from lldb_private::IOObject | |
| IOObject (FDType type) | |
| virtual | ~IOObject () |
| FDType | GetFdType () const |
Static Public Member Functions | |
| static llvm::Expected< Options > | OptionsFromURL (llvm::StringRef urlqs) |
| static llvm::Expected< std::unique_ptr< SerialPort > > | Create (int fd, OpenOptions options, Options serial_options, bool transfer_ownership) |
| static bool | classof (const File *file) |
| Static Public Member Functions inherited from lldb_private::NativeFile | |
| static bool | classof (const File *file) |
| Static Public Member Functions inherited from lldb_private::File | |
| static mode_t | ConvertOpenOptionsForPOSIXOpen (OpenOptions open_options) |
| static llvm::Expected< OpenOptions > | GetOptionsFromMode (llvm::StringRef mode) |
| static bool | DescriptorIsValid (int descriptor) |
| static llvm::Expected< const char * > | GetStreamOpenModeFromOptions (OpenOptions options) |
| static bool | classof (const File *file) |
Static Public Attributes | |
| static char | ID = 0 |
| Static Public Attributes inherited from lldb_private::NativeFile | |
| static char | ID = 0 |
| Static Public Attributes inherited from lldb_private::File | |
| static int | kInvalidDescriptor = -1 |
| static FILE * | kInvalidStream = nullptr |
| static char | ID = 0 |
| Static Public Attributes inherited from lldb_private::IOObject | |
| static const WaitableHandle | kInvalidHandleValue = -1 |
Private Member Functions | |
| SerialPort (int fd, OpenOptions options, Options serial_options, bool transfer_ownership) | |
| SerialPort (const SerialPort &)=delete | |
| const SerialPort & | operator= (const SerialPort &)=delete |
Private Attributes | |
| TerminalState | m_state |
|
private |
Definition at line 932 of file File.cpp.
References m_state, and lldb_private::NativeFile::NativeFile().
Referenced by Create(), operator=(), and SerialPort().
|
privatedelete |
References SerialPort().
Definition at line 488 of file File.h.
References ID, and lldb_private::File::isA().
|
overridevirtual |
Flush any buffers and release any resources owned by the file.
After Close() the file will be invalid.
Reimplemented from lldb_private::NativeFile.
Definition at line 937 of file File.cpp.
References lldb_private::NativeFile::Close(), and m_state.
|
static |
Definition at line 900 of file File.cpp.
References lldb_private::SerialPort::Options::BaudRate, error(), lldb_private::SerialPort::Options::Parity, lldb_private::SerialPort::Options::ParityCheck, SerialPort(), lldb_private::Terminal::SetBaudRate(), lldb_private::Terminal::SetParity(), lldb_private::Terminal::SetParityCheck(), lldb_private::Terminal::SetRaw(), lldb_private::Terminal::SetStopBits(), and lldb_private::SerialPort::Options::StopBits.
Referenced by lldb_private::ConnectionFileDescriptor::ConnectSerialPort().
|
inlineoverridevirtual |
Reimplemented from lldb_private::NativeFile.
Definition at line 485 of file File.h.
References ID, and lldb_private::File::isA().
|
inlineoverridevirtual |
IsValid.
Reimplemented from lldb_private::NativeFile.
Definition at line 478 of file File.h.
References lldb_private::eLazyBoolYes, lldb_private::NativeFile::IsValid(), and lldb_private::File::m_is_interactive.
|
privatedelete |
References SerialPort().
|
static |
Definition at line 845 of file File.cpp.
References lldb_private::SerialPort::Options::BaudRate, lldb_private::Terminal::Even, lldb_private::Terminal::Ignore, lldb_private::Terminal::Mark, lldb_private::Terminal::No, lldb_private::Terminal::Odd, lldb_private::SerialPort::Options::Parity, lldb_private::SerialPort::Options::ParityCheck, lldb_private::Terminal::ReplaceWithNUL, lldb_private::Terminal::Space, and lldb_private::SerialPort::Options::StopBits.
Referenced by lldb_private::ConnectionFileDescriptor::ConnectSerialPort().
|
static |
|
private |
Definition at line 497 of file File.h.
Referenced by Close(), and SerialPort().