llvm-project/lldb/test
Fred Riss d9166ad272 [lldb/Driver] Support terminal resizing
Summary:
The comment in the Editine.h header made it sound like editline was
just unable to handle terminal resizing. We were not ever telling
editline that the terminal had changed size, which might explain why
it wasn't working.

This patch threads a `TerminalSizeChanged()` callback through the
IOHandler and invokes it from the SIGWINCH handler in the driver. Our
`Editline` class already had a `TerminalSizeChanged()` method which
was invoked only when editline was configured.

This patch also changes `Editline` to not apply the changes right away
in `TerminalSizeChanged()`, but instead defer that to the next
character read. During my testing, it happened once that the signal
was received while our `ConnectionFileDescriptor::Read` was allocating
memory. As `el_resize` seems to allocate memory too, this crashed.

Reviewers: labath, teemperor

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D79654
2020-05-12 11:55:25 -07:00
..
API [lldb/Driver] Support terminal resizing 2020-05-12 11:55:25 -07:00
Shell [Reproducers] Serialize process arguments in ProcessInfo 2020-05-12 11:12:37 -07:00
Unit [CMake] Split logic across test suite subdirectories (NFC) 2019-10-24 10:58:22 -07:00
CMakeLists.txt Another attempt of D77452 - da0e91fee6 2020-04-15 17:52:36 -07:00
lit.cfg.py [test] Cleanup top-level lit.cfg.py 2019-10-10 19:51:47 +00:00
lit.site.cfg.py.in Re-land "[test] Split LLDB tests into API, Shell & Unit" 2019-10-09 19:22:02 +00:00