|
LLDB mainline
|
#include <climits>#include <iomanip>#include <optional>#include "lldb/Host/Editline.h"#include "lldb/Host/HostInfo.h"#include "lldb/Host/StreamFile.h"#include "lldb/Utility/AnsiTerminal.h"#include "lldb/Utility/CompletionRequest.h"#include "lldb/Utility/FileSpec.h"#include "lldb/Utility/LLDBAssert.h"#include "lldb/Utility/SelectHelper.h"#include "lldb/Utility/Status.h"#include "lldb/Utility/StreamString.h"#include "lldb/Utility/StringList.h"#include "lldb/Utility/Timeout.h"#include "lldb/lldb-forward.h"#include "llvm/Support/ConvertUTF.h"#include "llvm/Support/FileSystem.h"#include "llvm/Support/Locale.h"#include "llvm/Support/Threading.h"Go to the source code of this file.
Classes | |
| class | ScopedOptional< T > |
| class | lldb_private::line_editor::EditlineHistory |
Namespaces | |
| namespace | lldb_private |
| A class that represents a running process on the host machine. | |
| namespace | lldb_private::line_editor |
Macros | |
| #define | ESCAPE "\x1b" |
| https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf | |
| #define | ANSI_CLEAR_BELOW ESCAPE "[J" |
| #define | ANSI_CLEAR_RIGHT ESCAPE "[K" |
| #define | ANSI_SET_COLUMN_N ESCAPE "[%dG" |
| #define | ANSI_UP_N_ROWS ESCAPE "[%dA" |
| #define | ANSI_DOWN_N_ROWS ESCAPE "[%dB" |
| #define | EditLineConstString(str) |
| #define | EditLineStringFormatSpec "%s" |
| #define | history_w history |
| #define | history_winit history_init |
| #define | history_wend history_end |
| #define | HistoryW History |
| #define | HistEventW HistEvent |
| #define | LineInfoW LineInfo |
| #define | el_wgets el_gets |
| #define | el_wgetc el_getc |
| #define | el_wpush el_push |
| #define | el_wparse el_parse |
| #define | el_wset el_set |
| #define | el_wget el_get |
| #define | el_wline el_line |
| #define | el_winsertstr el_insertstr |
| #define | el_wdeletestr el_deletestr |
Typedefs | |
| typedef std::weak_ptr< EditlineHistory > | lldb_private::line_editor::EditlineHistoryWP |
Functions | |
| bool | IsOnlySpaces (const EditLineStringType &content) |
| static int | GetOperation (HistoryOperation op) |
| EditLineStringType | CombineLines (const std::vector< EditLineStringType > &lines) |
| std::vector< EditLineStringType > | SplitLines (const EditLineStringType &input) |
| EditLineStringType | FixIndentation (const EditLineStringType &line, int indent_correction) |
| int | GetIndentation (const EditLineStringType &line) |
| bool | IsInputPending (FILE *file) |
| static size_t | PrintCompletion (FILE *output_file, llvm::ArrayRef< CompletionResult::Completion > results, size_t max_completion_length, size_t max_length, std::optional< size_t > max_height=std::nullopt) |
| Prints completions and their descriptions to the given file. | |
| #define ANSI_CLEAR_BELOW ESCAPE "[J" |
Definition at line 43 of file Editline.cpp.
| #define ANSI_CLEAR_RIGHT ESCAPE "[K" |
Definition at line 44 of file Editline.cpp.
Referenced by lldb_private::Editline::GetLine().
| #define ANSI_DOWN_N_ROWS ESCAPE "[%dB" |
Definition at line 47 of file Editline.cpp.
Referenced by lldb_private::Editline::MoveCursor().
| #define ANSI_SET_COLUMN_N ESCAPE "[%dG" |
Definition at line 45 of file Editline.cpp.
Referenced by lldb_private::Editline::DeletePreviousCharCommand(), lldb_private::Editline::DisplayInput(), lldb_private::Editline::MoveCursor(), lldb_private::Editline::PreviousLineCommand(), and lldb_private::Editline::TypedCharacter().
| #define ANSI_UP_N_ROWS ESCAPE "[%dA" |
Definition at line 46 of file Editline.cpp.
Referenced by lldb_private::Editline::DeletePreviousCharCommand(), lldb_private::Editline::MoveCursor(), and lldb_private::Editline::PreviousLineCommand().
| #define EditLineConstString | ( | str | ) |
Definition at line 56 of file Editline.cpp.
Referenced by lldb_private::Editline::BreakLineCommand(), lldb_private::Editline::ConfigureEditor(), lldb_private::Editline::GetLine(), and lldb_private::Editline::GetLines().
| #define EditLineStringFormatSpec "%s" |
Definition at line 57 of file Editline.cpp.
Referenced by lldb_private::Editline::DisplayInput().
| #define el_wdeletestr el_deletestr |
Definition at line 76 of file Editline.cpp.
| #define el_wget el_get |
Definition at line 73 of file Editline.cpp.
| #define el_wgetc el_getc |
Definition at line 69 of file Editline.cpp.
Referenced by lldb_private::Editline::DisplayCompletions().
| #define el_wgets el_gets |
Definition at line 68 of file Editline.cpp.
Referenced by lldb_private::Editline::GetLine(), and lldb_private::Editline::GetLines().
| #define el_winsertstr el_insertstr |
Definition at line 75 of file Editline.cpp.
Referenced by lldb_private::Editline::DeleteNextCharCommand(), lldb_private::Editline::DeletePreviousCharCommand(), lldb_private::Editline::FixIndentationCommand(), and lldb_private::Editline::RevertLineCommand().
| #define el_wline el_line |
Definition at line 74 of file Editline.cpp.
Referenced by lldb_private::Editline::ApplyTerminalSizeChange(), lldb_private::Editline::BreakLineCommand(), lldb_private::Editline::DeleteNextCharCommand(), lldb_private::Editline::DeletePreviousCharCommand(), lldb_private::Editline::EndOrAddLineCommand(), lldb_private::Editline::FixIndentationCommand(), lldb_private::Editline::GetCharacter(), lldb_private::Editline::IsOnlySpaces(), lldb_private::Editline::MoveCursor(), lldb_private::Editline::NextLineCommand(), lldb_private::Editline::RevertLineCommand(), and lldb_private::Editline::SaveEditedLine().
| #define el_wparse el_parse |
Definition at line 71 of file Editline.cpp.
| #define el_wpush el_push |
Definition at line 70 of file Editline.cpp.
Referenced by lldb_private::Editline::GetLines().
| #define el_wset el_set |
Definition at line 72 of file Editline.cpp.
Referenced by lldb_private::Editline::AddFunctionToEditLine(), lldb_private::Editline::ConfigureEditor(), and lldb_private::Editline::SetGetCharacterFunction().
| #define ESCAPE "\x1b" |
https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
Definition at line 42 of file Editline.cpp.
| #define HistEventW HistEvent |
Definition at line 65 of file Editline.cpp.
| #define history_w history |
Definition at line 61 of file Editline.cpp.
Referenced by lldb_private::line_editor::EditlineHistory::EditlineHistory(), lldb_private::line_editor::EditlineHistory::Enter(), lldb_private::line_editor::EditlineHistory::Load(), lldb_private::Editline::RecallHistory(), and lldb_private::line_editor::EditlineHistory::Save().
| #define history_wend history_end |
Definition at line 63 of file Editline.cpp.
Referenced by lldb_private::line_editor::EditlineHistory::~EditlineHistory().
| #define history_winit history_init |
Definition at line 62 of file Editline.cpp.
Referenced by lldb_private::line_editor::EditlineHistory::EditlineHistory().
| #define HistoryW History |
Definition at line 64 of file Editline.cpp.
Referenced by lldb_private::line_editor::EditlineHistory::GetHistoryPtr(), and lldb_private::Editline::RecallHistory().
| #define LineInfoW LineInfo |
Definition at line 66 of file Editline.cpp.
Referenced by lldb_private::Editline::ApplyTerminalSizeChange(), lldb_private::Editline::BreakLineCommand(), lldb_private::Editline::DeleteNextCharCommand(), lldb_private::Editline::DeletePreviousCharCommand(), lldb_private::Editline::EndOrAddLineCommand(), lldb_private::Editline::FixIndentationCommand(), lldb_private::Editline::GetCharacter(), lldb_private::Editline::IsOnlySpaces(), lldb_private::Editline::MoveCursor(), lldb_private::Editline::NextLineCommand(), lldb_private::Editline::RevertLineCommand(), and lldb_private::Editline::SaveEditedLine().
| EditLineStringType CombineLines | ( | const std::vector< EditLineStringType > & | lines | ) |
Definition at line 133 of file Editline.cpp.
Referenced by lldb_private::Editline::GetLines().
| EditLineStringType FixIndentation | ( | const EditLineStringType & | line, |
| int | indent_correction ) |
Definition at line 161 of file Editline.cpp.
Referenced by lldb_private::Editline::BreakLineCommand().
| int GetIndentation | ( | const EditLineStringType & | line | ) |
Definition at line 170 of file Editline.cpp.
Referenced by lldb_private::Editline::BreakLineCommand().
|
static |
Definition at line 101 of file Editline.cpp.
References lldb_private::line_editor::Current, lldb_private::line_editor::Newer, lldb_private::line_editor::Newest, lldb_private::line_editor::Older, and lldb_private::line_editor::Oldest.
Referenced by lldb_private::Editline::RecallHistory().
| bool IsInputPending | ( | FILE * | file | ) |
Definition at line 180 of file Editline.cpp.
References SelectHelper::FDSetRead(), SelectHelper::Select(), SelectHelper::SetTimeout(), and lldb_private::Status::Success().
Referenced by lldb_private::Editline::BreakLineCommand(), and lldb_private::Editline::EndOrAddLineCommand().
| bool IsOnlySpaces | ( | const EditLineStringType & | content | ) |
Definition at line 93 of file Editline.cpp.
|
static |
Prints completions and their descriptions to the given file.
Only the completions in the interval [start, end) are printed.
Definition at line 953 of file Editline.cpp.
Referenced by lldb_private::Editline::DisplayCompletions().
| std::vector< EditLineStringType > SplitLines | ( | const EditLineStringType & | input | ) |
Definition at line 141 of file Editline.cpp.
Referenced by lldb_private::Editline::GetLine(), and lldb_private::Editline::RecallHistory().