llvm-project/lldb/source/Host/common
Raphael Isemann 4f7fb13f87 [lldb] Don't save empty expressions in the multiline editor history
Right now running `expr` to start the multiline expression editor and then
pressing enter causes an empty history empty to be created for the multiline
editor. That doesn't seem very useful for users as pressing the 'up' key will
now also bring up these empty expressions.

I don't think there is ever a use case for recalling a completely empty
expression from the history, so instead don't save those entries to the history
file and make sure we never recall them when navigating over the expression
history.

Note: This is actually a Swift downstream patch that got shipped with Apple's
LLDB for many years. However, this recently started conflicting with upstream
LLDB as D100048 added a test that made sure that empty expression entries don't
crash LLDB. Apple's LLDB was never affected by this crash as it never saved
empty expressions in the first place.

Reviewed By: augusto2112

Differential Revision: https://reviews.llvm.org/D108983
2021-08-31 18:51:18 +02:00
..
Editline.cpp [lldb] Don't save empty expressions in the multiline editor history 2021-08-31 18:51:18 +02:00
File.cpp [lldb] [gdb-remote] Sync vFile:open mode constants with GDB 2021-08-09 12:07:18 +02:00
FileAction.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
FileCache.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
FileSystem.cpp [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat 2021-08-09 12:06:59 +02:00
GetOptInc.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Host.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
HostInfoBase.cpp [lldb][NFC] Remove an outdated comment in HostInfoBase 2021-06-22 16:48:17 +02:00
HostNativeThreadBase.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
HostProcess.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
HostThread.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LZMA.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LockFileBase.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
MainLoop.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
MonitoringProcessLauncher.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
NativeProcessProtocol.cpp [lldb][AArch64] Add memory tag writing to lldb-server 2021-07-27 12:02:17 +01:00
NativeRegisterContext.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
NativeThreadProtocol.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
NativeWatchpointList.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionParser.cpp [lldb][NFC] Move OptionDefinition from lldb-private-types.h to its own Utility header 2020-11-12 15:30:26 +01:00
PipeBase.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ProcessLaunchInfo.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
ProcessRunLock.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
PseudoTerminal.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Socket.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
SocketAddress.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StringConvert.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
TCPSocket.cpp [lldb][NFC] Fix indentation in TCPSocket::CloseListenSockets 2020-08-13 12:29:24 +02:00
Terminal.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ThreadLauncher.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UDPSocket.cpp [lldb/Host] Modernize some socket functions 2020-04-23 14:20:26 +02:00
XML.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00