llvm-project/lldb
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
..
bindings Re-land "get rid of PythonInteger::GetInteger()" 2020-05-08 10:57:10 -07:00
cmake [lldb/CMake] Don't make PYTHON_RPATH a required variable. 2020-04-30 10:54:47 -07:00
docs [lldb/Docs] Add some more info about the test suite structure 2020-04-16 10:17:59 -07:00
examples [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
include/lldb [lldb/Driver] Support terminal resizing 2020-05-12 11:55:25 -07:00
packages/Python [lldb/test] Make "inline" tests handle multiple statements at the same location 2020-05-11 16:37:34 +02:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [lldb/Scripts] proc.returncode is set in proc.communicate 2020-04-21 11:30:15 -07:00
source [lldb/Driver] Support terminal resizing 2020-05-12 11:55:25 -07:00
test [lldb/Driver] Support terminal resizing 2020-05-12 11:55:25 -07:00
third_party/Python/module [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
tools Quote error string from qLaunchSuccess 2020-05-11 20:05:57 -07:00
unittests [Reproducers] Serialize process arguments in ProcessInfo 2020-05-12 11:12:37 -07:00
utils [lldb/Utils] Serialize exit code in lldb-repro.py 2020-05-05 16:05:49 -07:00
.clang-format
.clang-tidy [lldb] Add .clang-tidy with customization to disable readability-identifier-naming 2020-03-09 12:50:28 -07:00
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [lldb/CMake] Only CMAKE_CFG_INTDIR if it's not '.' 2020-03-27 17:49:00 -07:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py