26#include "llvm/Support/ConvertUTF.h"
28#include "llvm/Support/FileSystem.h"
29#include "llvm/Support/Locale.h"
30#include "llvm/Support/Threading.h"
43#define ANSI_CLEAR_BELOW ESCAPE "[J"
44#define ANSI_CLEAR_RIGHT ESCAPE "[K"
45#define ANSI_SET_COLUMN_N ESCAPE "[%dG"
46#define ANSI_UP_N_ROWS ESCAPE "[%dA"
47#define ANSI_DOWN_N_ROWS ESCAPE "[%dB"
49#if LLDB_EDITLINE_USE_WCHAR
51#define EditLineConstString(str) L##str
52#define EditLineStringFormatSpec "%ls"
56#define EditLineConstString(str) str
57#define EditLineStringFormatSpec "%s"
61#define history_w history
62#define history_winit history_init
63#define history_wend history_end
64#define HistoryW History
65#define HistEventW HistEvent
66#define LineInfoW LineInfo
68#define el_wgets el_gets
69#define el_wgetc el_getc
70#define el_wpush el_push
71#define el_wparse el_parse
74#define el_wline el_line
75#define el_winsertstr el_insertstr
76#define el_wdeletestr el_deletestr
82 template <
typename...
Args>
85 m_optional.emplace(std::forward<Args>(args)...);
94 for (
wchar_t ch : content) {
130 llvm_unreachable(
"Fully covered switch!");
136 combined_stream << line.c_str() <<
"\n";
138 return combined_stream.str();
142 std::vector<EditLineStringType> result;
144 while (start < input.length()) {
145 size_t end = input.find(
'\n', start);
146 if (end == std::string::npos) {
147 result.push_back(input.substr(start));
150 result.push_back(input.substr(start, end - start));
155 if (result.empty()) {
156 result.emplace_back();
162 int indent_correction) {
163 if (indent_correction == 0)
165 if (indent_correction < 0)
166 return line.substr(-indent_correction);
186 const int fd = fileno(file);
188 select_helper.
SetTimeout(std::chrono::microseconds(0));
215 FileSpec lldb_dir = HostInfo::GetUserLLDBDir();
219 if (!llvm::sys::fs::create_directory(lldb_dir.
GetPath())) {
220#if LLDB_EDITLINE_USE_WCHAR
221 std::string filename =
m_prefix +
"-widehistory";
223 std::string filename =
m_prefix +
"-history";
248 typedef std::map<std::string, EditlineHistoryWP> WeakHistoryMap;
249 static std::recursive_mutex g_mutex;
250 static WeakHistoryMap g_weak_map;
251 std::lock_guard<std::recursive_mutex> guard(g_mutex);
252 WeakHistoryMap::const_iterator pos = g_weak_map.find(prefix);
254 if (pos != g_weak_map.end()) {
255 history_sp = pos->second.lock();
258 g_weak_map.erase(pos);
261 g_weak_map[prefix] = history_sp;
315 std::max<int>(3, std::to_string(line_number).length() + 1);
321 if (use_line_numbers && prompt.length() == 0)
323 std::string continuation_prompt = prompt;
329 const size_t padded_prompt_width =
330 std::max(prompt_width, cont_prompt_width);
331 if (prompt_width < padded_prompt_width)
332 prompt += std::string(padded_prompt_width - prompt_width,
' ');
333 else if (cont_prompt_width < padded_prompt_width)
334 continuation_prompt +=
335 std::string(padded_prompt_width - cont_prompt_width,
' ');
338 if (use_line_numbers) {
342 (line_index == 0) ? prompt.c_str() : continuation_prompt.c_str());
343 return std::string(std::move(prompt_stream.
GetString()));
345 return (line_index == 0) ? prompt : continuation_prompt;
360 return editor[0] ==
'e';
366 character < info->lastchar; character++) {
367 if (*character !=
' ')
396 int editline_cursor_position =
405 if (toLine != fromLine) {
408 std::abs(toLine - fromLine));
430 for (
int index = firstIndex; index < line_count; index++) {
437 if (index < line_count - 1)
460#if LLDB_EDITLINE_USE_WCHAR
462 llvm::convertWideToUTF8(line, buffer);
478 HistEventW history_event;
479 std::vector<EditLineStringType> new_input_lines;
499 llvm_unreachable(
"unsupported history direction");
513 llvm_unreachable(
"unsupported history direction");
520 new_input_lines =
SplitLines(history_event.str);
537 llvm_unreachable(
"unsupported history direction");
566 int lineLength = (int)((info->lastchar - info->buffer) +
GetPromptWidth());
615 llvm_unreachable(
"Success should have resulted in positive read_count.");
617 llvm_unreachable(
"Interrupts should have been handled above.");
640 auto new_line_fragment =
657#if LLDB_EDITLINE_USE_WCHAR
659 llvm::convertWideToUTF8(new_line_fragment, buffer);
666 new_line_fragment =
FixIndentation(new_line_fragment, indent_correction);
697 info->cursor == info->lastchar) {
706 for (
unsigned index = 0; index < lines.GetSize(); index++) {
707#if LLDB_EDITLINE_USE_WCHAR
708 std::wstring wbuffer;
709 llvm::ConvertUTF8toWide(lines[index], wbuffer);
729 if (info->cursor < info->lastchar) {
738 if (ch == 4 && info->buffer == info->lastchar) {
752 info->cursor = cursor;
769 if (info->cursor > info->buffer) {
850 int cursor_position = (int)((info->cursor - info->buffer) +
GetPromptWidth());
881 int cursor_position = info->cursor - info->buffer;
886 int indent_correction =
890 if (indent_correction == 0)
895 if (indent_correction > 0) {
896 currentLine = currentLine.insert(0, indent_correction,
' ');
898 currentLine = currentLine.erase(0, -indent_correction);
900#if LLDB_EDITLINE_USE_WCHAR
901 std::wstring wbuffer;
902 llvm::ConvertUTF8toWide(currentLine, wbuffer);
925 if (info->cursor > info->lastchar) {
926 info->cursor = info->lastchar;
953 llvm::ArrayRef<CompletionResult::Completion> results,
954 size_t max_completion_length,
size_t max_length,
955 std::optional<size_t> max_height = std::nullopt) {
956 constexpr size_t ellipsis_length = 3;
957 constexpr size_t padding_length = 8;
958 constexpr size_t separator_length = 4;
960 const size_t description_col =
961 std::min(max_completion_length + padding_length, max_length);
963 size_t lines_printed = 0;
964 size_t results_printed = 0;
966 if (max_height && lines_printed >= *max_height)
971 if (c.GetCompletion().empty())
975 fprintf(output_file,
" ");
980 const size_t completion_length = c.GetCompletion().size();
981 if (padding_length + completion_length < max_length) {
982 fprintf(output_file,
"%-*s",
983 static_cast<int>(description_col - padding_length),
984 c.GetCompletion().c_str());
988 fprintf(output_file,
"%.*s...\n",
989 static_cast<int>(max_length - padding_length - ellipsis_length),
990 c.GetCompletion().c_str());
997 if (c.GetDescription().empty() ||
998 description_col + separator_length + ellipsis_length >= max_length) {
999 fprintf(output_file,
"\n");
1005 fprintf(output_file,
" -- ");
1024 for (llvm::StringRef line : llvm::split(c.GetDescription(),
'\n')) {
1027 if (max_height && lines_printed >= *max_height)
1030 fprintf(output_file,
"%*s",
1031 static_cast<int>(description_col + separator_length),
"");
1034 const size_t position = description_col + separator_length;
1035 const size_t description_length = line.size();
1036 if (position + description_length < max_length) {
1037 fprintf(output_file,
"%.*s\n",
static_cast<int>(description_length),
1041 fprintf(output_file,
"%.*s...\n",
1042 static_cast<int>(max_length - position - ellipsis_length),
1049 return results_printed;
1053 Editline &editline, llvm::ArrayRef<CompletionResult::Completion> results) {
1054 assert(!results.empty());
1056 std::optional<LockedStreamFile> locked_stream =
1059 fprintf(locked_stream->GetFile().GetStream(),
1069 std::max_element(results.begin(), results.end(), [](
auto &c1,
auto &c2) {
1070 return c1.GetCompletion().size() < c2.GetCompletion().size();
1073 const size_t max_len = longest->GetCompletion().size();
1076 while (cur_pos < results.size()) {
1078 locked_stream->GetFile().GetStream(), results.slice(cur_pos), max_len,
1080 all ? std::nullopt : std::optional<size_t>(page_size));
1082 if (cur_pos >= results.size())
1085 fprintf(locked_stream->GetFile().GetStream(),
"More (Y/n/a): ");
1090 locked_stream.reset();
1106 fprintf(locked_stream->GetFile().GetStream(),
"^C\n");
1110 fprintf(locked_stream->GetFile().GetStream(),
"\n");
1111 if (got_char == -1 || reply ==
'n')
1124 const LineInfo *line_info = el_line(
m_editline);
1126 llvm::StringRef line(line_info->buffer,
1127 line_info->lastchar - line_info->buffer);
1128 unsigned cursor_index = line_info->cursor - line_info->buffer;
1134 llvm::ArrayRef<CompletionResult::Completion> results = result.
GetResults();
1139 if (results.size() == 0)
1142 if (results.size() == 1) {
1144 switch (completion.
GetMode()) {
1153 to_add.push_back(
' ');
1159 return CC_REDISPLAY;
1169 el_deletestr(
m_editline, line_info->cursor - line_info->buffer);
1174 return CC_REDISPLAY;
1179 if (!longest_prefix.empty())
1182 if (!longest_prefix.empty()) {
1183 el_insertstr(
m_editline, longest_prefix.c_str());
1184 return CC_REDISPLAY;
1191 return CC_REDISPLAY;
1196 return CC_REDISPLAY;
1199 const LineInfo *line_info = el_line(
m_editline);
1200 llvm::StringRef line(line_info->buffer,
1201 line_info->lastchar - line_info->buffer);
1206 return CC_REDISPLAY;
1210 std::string typed = std::string(1, ch);
1214 return CC_REDISPLAY;
1217 const LineInfo *line_info = el_line(
m_editline);
1218 llvm::StringRef line(line_info->buffer,
1219 line_info->lastchar - line_info->buffer);
1223 std::string to_add_color =
1227 size_t new_autosuggestion_size = line.size() + to_add->length();
1230 size_t spaces_to_print =
1232 std::string spaces = std::string(spaces_to_print,
' ');
1237 int editline_cursor_position =
1238 (int)((line_info->cursor - line_info->buffer) +
GetPromptWidth());
1246 return CC_REDISPLAY;
1286 fputs(
"Could not load history file\n.",
1308 [](EditLine *editline,
int ch) {
1315 [](EditLine *editline,
int ch) {
1321 [](EditLine *editline,
int ch) {
1327 [](EditLine *editline,
int ch) {
1333 [](EditLine *editline,
int ch) {
1344 [](EditLine *editline,
int ch) {
1350 [](EditLine *editline,
int ch) {
1356 [](EditLine *editline,
int ch) {
1362 [](EditLine *editline,
int ch) {
1368 [](EditLine *editline,
int ch) {
1390 el_set(
m_editline, EL_BIND,
"^r",
"em-inc-search-prev",
1397 [](EditLine *editline,
int ch) {
1401 el_set(
m_editline, EL_BIND,
"^f",
"lldb-apply-complete",
1407 [](EditLine *editline,
int ch) {
1411 char bind_key[2] = {0, 0};
1412 llvm::StringRef ascii_chars =
1413 "abcdefghijklmnopqrstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXZY1234567890!\"#$%"
1414 "&'()*+,./:;<=>?@[]_`{|}~ ";
1415 for (
char c : ascii_chars) {
1417 el_set(
m_editline, EL_BIND, bind_key,
"lldb-typed-character", NULL);
1419 el_set(
m_editline, EL_BIND,
"\\-",
"lldb-typed-character", NULL);
1420 el_set(
m_editline, EL_BIND,
"\\^",
"lldb-typed-character", NULL);
1421 el_set(
m_editline, EL_BIND,
"\\\\",
"lldb-typed-character", NULL);
1425 el_set(
m_editline, EL_BIND,
"^w",
"ed-delete-prev-word",
1427 el_set(
m_editline, EL_BIND,
"\t",
"lldb-complete",
1447 [](EditLine *editline,
int ch) {
1453 char bind_key[2] = {0, 0};
1455 while (*indent_chars) {
1456 bind_key[0] = *indent_chars;
1457 el_set(
m_editline, EL_BIND, bind_key,
"lldb-fix-indentation", NULL);
1464 el_set(
m_editline, EL_BIND,
"\n",
"lldb-end-or-add-line", NULL);
1465 el_set(
m_editline, EL_BIND,
"\r",
"lldb-end-or-add-line", NULL);
1468 el_set(
m_editline, EL_BIND,
"^p",
"lldb-previous-line", NULL);
1469 el_set(
m_editline, EL_BIND,
"^n",
"lldb-next-line", NULL);
1470 el_set(
m_editline, EL_BIND,
"^?",
"lldb-delete-previous-char", NULL);
1471 el_set(
m_editline, EL_BIND,
"^d",
"lldb-delete-next-char", NULL);
1489 el_set(
m_editline, EL_BIND,
"^H",
"lldb-delete-previous-char", NULL);
1494 el_set(
m_editline, EL_BIND,
"-a",
"x",
"lldb-delete-next-char", NULL);
1495 el_set(
m_editline, EL_BIND,
"-a",
"^H",
"lldb-delete-previous-char",
1497 el_set(
m_editline, EL_BIND,
"-a",
"^?",
"lldb-delete-previous-char",
1502 el_set(
m_editline, EL_BIND,
"-a",
"[A",
"lldb-previous-line", NULL);
1503 el_set(
m_editline, EL_BIND,
"-a",
"[B",
"lldb-next-line", NULL);
1504 el_set(
m_editline, EL_BIND,
"-a",
"[\\^",
"lldb-revert-line", NULL);
1513 el_get(editline, EL_CLIENTDATA, &editor);
1523 assert(output_stream_sp && output_stream_sp->GetUnlockedFile().GetStream());
1524 assert(error_stream_sp && output_stream_sp->GetUnlockedFile().GetStream());
1526 m_editor_name = (editline_name ==
nullptr) ?
"lldb-tmp" : editline_name;
1553 continuation_prompt ==
nullptr ?
"" : continuation_prompt;
1571 if (el_get(
m_editline, EL_GETTC,
"co", &columns,
nullptr) == 0) {
1585 if (el_get(
m_editline, EL_GETTC,
"li", &rows,
nullptr) == 0) {
1652 if (input ==
nullptr) {
1657#if LLDB_EDITLINE_USE_WCHAR
1658 llvm::convertWideToUTF8(
SplitLines(input)[0], line);
1669 bool &interrupted) {
1718 locked_stream.
Write(s, len);
1744#if !LLDB_EDITLINE_USE_WCHAR
1745 if (ch == (
char)EOF)
1748 out = (
unsigned char)ch;
1751 llvm::SmallString<4> input;
1753 input.push_back(ch);
1754 auto *cur_ptr =
reinterpret_cast<const llvm::UTF8 *
>(input.begin());
1755 auto *end_ptr =
reinterpret_cast<const llvm::UTF8 *
>(input.end());
1756 llvm::UTF32 code_point = 0;
1757 llvm::ConversionResult cr = llvm::convertUTF8Sequence(
1758 &cur_ptr, end_ptr, &code_point, llvm::lenientConversion);
1760 case llvm::conversionOK:
1763 case llvm::targetExhausted:
1764 case llvm::sourceIllegal:
1766 case llvm::sourceExhausted:
1769 &ch, 1, std::chrono::seconds(0), status,
nullptr);
1770 if (read_count == 0)
EditLineStringType CombineLines(const std::vector< EditLineStringType > &lines)
#define EditLineConstString(str)
#define EditLineStringFormatSpec
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.
EditLineStringType FixIndentation(const EditLineStringType &line, int indent_correction)
bool IsInputPending(FILE *file)
#define ANSI_SET_COLUMN_N
std::vector< EditLineStringType > SplitLines(const EditLineStringType &input)
bool IsOnlySpaces(const EditLineStringType &content)
int GetIndentation(const EditLineStringType &line)
static int GetOperation(HistoryOperation op)
std::optional< T > & m_optional
ScopedOptional(std::optional< T > &optional, Args &&...args)
lldb_private::Status Select()
void FDSetRead(lldb::socket_t fd)
void SetTimeout(const std::chrono::microseconds &timeout)
A command line argument class.
"lldb/Utility/ArgCompletionRequest.h"
const Args & GetParsedLine() const
llvm::StringRef GetCursorArgumentPrefix() const
const Args::ArgEntry & GetParsedArg()
size_t GetCursorIndex() const
A single completion and all associated data.
const std::string & GetCompletion() const
CompletionMode GetMode() const
llvm::ArrayRef< Completion > GetResults() const
void GetMatches(StringList &matches) const
Adds all collected completion matches to the given list.
IsInputCompleteCallbackType m_is_input_complete_callback
EditorStatus m_editor_status
std::optional< LockedStreamFile > m_locked_output
lldb::LockableStreamFileSP m_output_stream_sp
unsigned char PreviousLineCommand(int ch)
Line navigation command used when ^P or up arrow are pressed in multi-line mode.
unsigned char RecallHistory(HistoryOperation op)
Replaces the current multi-line session with the next entry from history.
size_t GetTerminalWidth()
bool IsOnlySpaces()
Returns true if the current EditLine buffer contains nothing but spaces, or is empty.
void SaveEditedLine()
Save the line currently being edited.
void MoveCursor(CursorLocation from, CursorLocation to)
Move the cursor from one well-established location to another using relative line positioning and abs...
std::string m_suggestion_ansi_suffix
void SetGetCharacterFunction(EditlineGetCharCallbackType callbackFn)
bool m_needs_prompt_repaint
std::string m_current_prompt
static void DisplayCompletions(Editline &editline, llvm::ArrayRef< CompletionResult::Completion > results)
std::string m_set_continuation_prompt
std::size_t m_previous_autosuggestion_size
ConnectionFileDescriptor m_input_connection
unsigned char BufferStartCommand(int ch)
Buffer start command used when Esc < is typed in multi-line emacs mode.
const char * Prompt()
Prompt implementation for EditLine.
unsigned char EndOrAddLineCommand(int ch)
Command used when return is pressed in multi-line mode.
unsigned char DeletePreviousCharCommand(int ch)
Delete command used when backspace is pressed in multi-line mode.
int GetLineIndexForLocation(CursorLocation location, int cursor_row)
Helper method used by MoveCursor to determine relative line position.
std::string m_prompt_ansi_prefix
bool IsEmacs()
Returns true if the underlying EditLine session's keybindings are Emacs-based, or false if they are V...
CompleteCallbackType m_completion_callback
size_t GetPromptWidth()
Determines the width of the prompt in characters.
unsigned char PreviousHistoryCommand(int ch)
History navigation command used when Alt + up arrow is pressed in multi-line mode.
const char * m_fix_indentation_callback_chars
std::string m_editor_name
uint32_t GetCurrentLine()
Returns the index of the line currently being edited.
void DisplayInput(int firstIndex=0)
Clear from cursor position to bottom of screen and print input lines including prompts,...
int GetCharacter(EditLineGetCharType *c)
Character reading implementation for EditLine that supports our multi-line editing trickery.
Editline(const char *editor_name, FILE *input_file, lldb::LockableStreamFileSP output_stream_sp, lldb::LockableStreamFileSP error_stream_sp, bool color)
int m_revert_cursor_index
void TerminalSizeChanged()
Call when the terminal size changes.
volatile std::sig_atomic_t m_terminal_size_has_changed
void SetEditLinePromptCallback(EditlinePromptCallbackType callbackFn)
EditlineHistorySP m_history_sp
void ApplyPendingTerminalSizeChange()
Apply a resize signaled by TerminalSizeChanged() if one is pending.
static Editline * InstanceFor(::EditLine *editline)
Uses the user data storage of EditLine to retrieve an associated instance of Editline.
bool GetLine(std::string &line, bool &interrupted)
Prompts for and reads a single line of user input.
void SetCurrentLine(int line_index)
Sets the current line index between line edits to allow free movement between lines.
int CountRowsForLine(const EditLineStringType &content)
Counts the number of rows a given line of content will end up occupying, taking into account both the...
void PrintAsync(lldb::LockableStreamFileSP stream_sp, const char *s, size_t len)
void ConfigureEditor(bool multiline)
Ensures that the current EditLine instance is properly configured for single or multi-line editing.
unsigned char NextLineCommand(int ch)
Line navigation command used when ^N or down arrow are pressed in multi-line mode.
std::vector< EditLineStringType > m_live_history_lines
void ApplyTerminalSizeChange()
lldb::LockableStreamFileSP m_error_stream_sp
void AddFunctionToEditLine(const EditLineCharType *command, const EditLineCharType *helptext, EditlineCommandCallbackType callbackFn)
std::vector< EditLineStringType > m_input_lines
bool CompleteCharacter(char ch, EditLineGetCharType &out)
bool Cancel()
Cancel this edit and obliterate all trace of it.
unsigned char DeleteNextCharCommand(int ch)
Delete command used when delete is pressed in multi-line mode.
std::string m_suggestion_ansi_prefix
SuggestionCallbackType m_suggestion_callback
unsigned char FixIndentationCommand(int ch)
Respond to normal character insertion by fixing line indentation.
unsigned char NextHistoryCommand(int ch)
History navigation command used when Alt + down arrow is pressed in multi-line mode.
void SetPrompt(const char *prompt)
Sets a string to be used as a prompt, or combined with a line number to form a prompt.
size_t GetTerminalHeight()
unsigned char BufferEndCommand(int ch)
Buffer end command used when Esc > is typed in multi-line emacs mode.
unsigned char TypedCharacter(int ch)
Command used when a character is typed.
unsigned char BreakLineCommand(int ch)
Line break command used when meta+return is pressed in multi-line mode.
void UseColor(bool use_color)
Sets if editline should use color.
RedrawCallbackType m_redraw_callback
FixIndentationCallbackType m_fix_indentation_callback
unsigned char ApplyAutosuggestCommand(int ch)
Apply autosuggestion part in gray as editline.
unsigned char TabCommand(int ch)
Context-sensitive tab insertion or code completion command used when the tab key is typed.
void SetContinuationPrompt(const char *continuation_prompt)
Sets an alternate string to be used as a prompt for the second line and beyond in multi-line editing ...
unsigned m_current_line_index
StringList GetInputAsStringList(int line_count=UINT32_MAX)
Convert the current input lines into a UTF8 StringList.
std::string PromptForIndex(int line_index)
Returns the complete prompt by combining the prompt or continuation prompt with line numbers as appro...
unsigned char RevertLineCommand(int ch)
Revert line command used when moving between lines.
bool Interrupt()
Interrupt the current edit as if ^C was pressed.
const char * GetPrompt()
Returns the prompt established by SetPrompt.
void SetBaseLineNumber(int line_number)
Sets the lowest line number for multi-line editing sessions.
bool GetLines(int first_line_number, StringList &lines, bool &interrupted)
Prompts for and reads a multi-line batch of user input.
std::string m_prompt_ansi_suffix
FileSpec CopyByAppendingPathComponent(llvm::StringRef component) const
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
virtual FILE * GetStream()
Get the underlying libc stream for this file, or NULL.
bool Success() const
Test for success condition.
llvm::StringRef GetString() const
size_t Write(const void *src, size_t src_len)
Output character bytes to the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
void AppendString(const std::string &s)
const char * GetStringAtIndex(size_t idx) const
std::string LongestCommonPrefix()
HistoryW * GetHistoryPtr()
void Enter(const EditLineCharType *line_cstr)
const char * GetHistoryFilePath()
std::string m_path
Path to the history file.
std::string m_prefix
The prefix name (usually the editline program name) to use when loading/saving history.
HistoryW * m_history
The history object.
EditlineHistory(const std::string &prefix, uint32_t size, bool unique_entries)
static EditlineHistorySP GetHistory(const std::string &prefix)
HistEventW m_event
The history event needed to contain all history events.
size_t ColumnWidth(llvm::StringRef str)
std::weak_ptr< EditlineHistory > EditlineHistoryWP
std::shared_ptr< EditlineHistory > EditlineHistorySP
std::stringstream EditLineStringStreamType
unsigned char(*)(::EditLine *editline, int ch) EditlineCommandCallbackType
HistoryOperation
Operation for the history.
EditorStatus
Status used to decide when and how to start editing another line in multi-line sessions.
@ Interrupted
Editing interrupted.
@ EndOfInput
End of input reported.
@ Complete
Editing complete, returns the complete set of edited lines.
@ Editing
The default state proceeds to edit the current line.
std::string EditLineStringType
const char *(*)(::EditLine *editline) EditlinePromptCallbackType
CursorLocation
Established locations that can be easily moved among with MoveCursor.
@ BlockEnd
The location immediately after the last character in a multi-line edit session.
@ BlockStart
The start of the first line in a multi-line edit session.
@ EditingCursor
The location of the cursor on the current line in a multi-line edit session.
@ EditingPrompt
The start of the current line in a multi-line edit session.
int(*)(::EditLine *editline, EditLineGetCharType *c) EditlineGetCharCallbackType
A class that represents a running process on the host machine.
@ Partial
The current token has been partially completed.
@ Normal
The current token has been completed.
@ RewriteLine
The full line has been rewritten by the completion.
ConnectionStatus
Connection Status Types.
@ eConnectionStatusError
Check GetError() for details.
@ eConnectionStatusInterrupted
Interrupted read.
@ eConnectionStatusTimedOut
Request timed out.
@ eConnectionStatusEndOfFile
End-of-file encountered.
@ eConnectionStatusSuccess
Success.
@ eConnectionStatusLostConnection
Lost connection while connected to a valid connection.
@ eConnectionStatusNoConnection
No connection.
std::shared_ptr< lldb_private::LockableStreamFile > LockableStreamFileSP
bool IsQuoted() const
Returns true if this argument was quoted in any way.
char GetQuoteChar() const