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:
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();
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,
+
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
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(),
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
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(),
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(),
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(),
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(),
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.
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
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
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
14 matches
Mail list logo