[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-21 Thread Michał Górny via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4a7b4beac759: [lldb] Add serial:// protocol for connecting to serial port (authored by mgorny). Herald added a project: LLDB. Changed prior to commit:

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-21 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added inline comments. This revision is now accepted and ready to land. Comment at: lldb/source/Host/common/File.cpp:847 +: NativeFile(fd, options, transfer_ownership), m_state(fd) {} +Status SerialPort::Close() { + m_state.Restore();

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked 3 inline comments as done. mgorny added inline comments. Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:772-774 + llvm::Error error = llvm::Error::success(); + m_io_sp = std::make_shared(fd, File::eOpenOptionReadWrite, +

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 380985. mgorny added a comment. Use unique_ptr. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111355/new/ https://reviews.llvm.org/D111355 Files: lldb/include/lldb/Host/File.h lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:772-774 + llvm::Error error = llvm::Error::success(); + m_io_sp = std::make_shared(fd, File::eOpenOptionReadWrite, + serial_options.get(),

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 380954. mgorny added a comment. Use a fallible ctor approach. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111355/new/ https://reviews.llvm.org/D111355 Files: lldb/include/lldb/Host/File.h

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:772-774 + llvm::Error error = llvm::Error::success(); + m_io_sp = std::make_shared(fd, File::eOpenOptionReadWrite, + serial_options.get(),

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:772-774 + llvm::Error error = llvm::Error::success(); + m_io_sp = std::make_shared(fd, File::eOpenOptionReadWrite, + serial_options.get(),

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:772-774 + llvm::Error error = llvm::Error::success(); + m_io_sp = std::make_shared(fd, File::eOpenOptionReadWrite, + serial_options.get(),

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:772-774 + llvm::Error error = llvm::Error::success(); + m_io_sp = std::make_shared(fd, File::eOpenOptionReadWrite, + serial_options.get(),

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port

2021-10-19 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 380731. mgorny retitled this revision from "[lldb] Add serial:// protocol for connecting to serial port [WIP/PoC]" to "[lldb] Add serial:// protocol for connecting to serial port". mgorny added a comment. Move `serial://` URL parsing to `SerialPort` class.

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port [WIP/PoC]

2021-10-14 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. I don't really have a strong opinion about this. I think we should leave the option of leaving port settings unchanged. I'll check what gdb does, as I suppose interoperability with gdbserver is also useful. I guess people are more likely to connect to other servers than

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port [WIP/PoC]

2021-10-14 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. This looks reasonable to me. In case the url does not specify port parameters, it might be better to set them to known sane defaults instead of leaving them unchanged. That way lldb and lldb-server could "just connect". However, I don't know much about serial ports so

[Lldb-commits] [PATCH] D111355: [lldb] Add serial:// protocol for connecting to serial port [WIP/PoC]

2021-10-07 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: labath, teemperor, krytarowski, emaste. mgorny requested review of this revision. Add a new serial:// protocol along with SerialPort that provides a new API to open serial ports. The URL consists of serial device path followed by URL-style