Re: [Lldb-commits] [PATCH] D6959: LLDB Help Improvements
k8stone closed this revision. k8stone added a comment. Long since complete. http://reviews.llvm.org/D6959 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r267749 - Renamed system plugin directory to address https://bugs.swift.org/browse/SR-1093
Author: kate Date: Wed Apr 27 12:49:51 2016 New Revision: 267749 URL: http://llvm.org/viewvc/llvm-project?rev=267749&view=rev Log: Renamed system plugin directory to address https://bugs.swift.org/browse/SR-1093 Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/HostInfoLinux.cpp?rev=267749&r1=267748&r2=267749&view=diff == --- lldb/trunk/source/Host/linux/HostInfoLinux.cpp (original) +++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp Wed Apr 27 12:49:51 2016 @@ -235,7 +235,7 @@ HostInfoLinux::ComputeSupportExeDirector bool HostInfoLinux::ComputeSystemPluginsDirectory(FileSpec &file_spec) { -FileSpec temp_file("/usr/lib/lldb", true); +FileSpec temp_file("/usr/lib/lldb/plugins", true); file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str()); return true; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)
k8stone removed rL LLVM as the repository for this revision. k8stone updated this revision to Diff 63867. k8stone added a comment. clang-format applied. Greg's recommendation to document the multi-line editing behavior in help make sense, but should land after the major help rework in progress. http://reviews.llvm.org/D22284 Files: include/lldb/Host/Editline.h source/Host/common/Editline.cpp Index: source/Host/common/Editline.cpp === --- source/Host/common/Editline.cpp +++ source/Host/common/Editline.cpp @@ -657,41 +657,9 @@ // Establish the new cursor position at the start of a line when inserting a line break m_revert_cursor_index = 0; -// Don't perform end of input detection or automatic formatting when pasting +// Don't perform automatic formatting when pasting if (!IsInputPending (m_input_file)) { -// If this is the end of the last line, treat this as a potential exit -if (m_current_line_index == m_input_lines.size() - 1 && new_line_fragment.length() == 0) -{ -bool end_of_input = true; -if (m_is_input_complete_callback) -{ -SaveEditedLine(); -auto lines = GetInputAsStringList(); -end_of_input = m_is_input_complete_callback (this, lines, m_is_input_complete_callback_baton); - -// The completion test is allowed to change the input lines when complete -if (end_of_input) -{ -m_input_lines.clear(); -for (unsigned index = 0; index < lines.GetSize(); index++) -{ -#if LLDB_EDITLINE_USE_WCHAR -m_input_lines.insert (m_input_lines.end(), m_utf8conv.from_bytes (lines[index])); -#else -m_input_lines.insert (m_input_lines.end(), lines[index]); -#endif -} -} -} -if (end_of_input) -{ -fprintf (m_output_file, "\n"); -m_editor_status = EditorStatus::Complete; -return CC_NEWLINE; -} -} - // Apply smart indentation if (m_fix_indentation_callback) { @@ -720,8 +688,50 @@ } unsigned char -Editline::DeleteNextCharCommand (int ch) +Editline::EndOrAddLineCommand(int ch) { +// Don't perform end of input detection when pasting, always treat this as a line break +if (IsInputPending(m_input_file)) +{ +return BreakLineCommand(ch); +} + +// Save any edits to this line +SaveEditedLine(); + +// If this is the end of the last line, consider whether to add a line instead +const LineInfoW *info = el_wline(m_editline); +if (m_current_line_index == m_input_lines.size() - 1 && info->cursor == info->lastchar) +{ +if (m_is_input_complete_callback) +{ +auto lines = GetInputAsStringList(); +if (!m_is_input_complete_callback(this, lines, m_is_input_complete_callback_baton)) +{ +return BreakLineCommand(ch); +} + +// The completion test is allowed to change the input lines when complete +m_input_lines.clear(); +for (unsigned index = 0; index < lines.GetSize(); index++) +{ +#if LLDB_EDITLINE_USE_WCHAR +m_input_lines.insert(m_input_lines.end(), m_utf8conv.from_bytes(lines[index])); +#else +m_input_lines.insert(m_input_lines.end(), lines[index]); +#endif +} +} +} +MoveCursor(CursorLocation::EditingCursor, CursorLocation::BlockEnd); +fprintf(m_output_file, "\n"); +m_editor_status = EditorStatus::Complete; +return CC_NEWLINE; +} + +unsigned char +Editline::DeleteNextCharCommand(int ch) +{ LineInfoW * info = const_cast(el_wline (m_editline)); // Just delete the next character normally if possible @@ -860,8 +870,24 @@ } unsigned char -Editline::FixIndentationCommand (int ch) +Editline::PreviousHistoryCommand(int ch) { +SaveEditedLine(); + +return RecallHistory(true); +} + +unsigned char +Editline::NextHistoryCommand(int ch) +{ +SaveEditedLine(); + +return RecallHistory(false); +} + +unsigned char +Editline::FixIndentationCommand(int ch) +{ if (!m_fix_indentation_callback) return CC_NORM; @@ -1077,6 +1103,10 @@ el_wset(m_editline, EL_ADDFN, EditLineConstString("lldb-break-line"), EditLineConstString("Insert a line break"), (EditlineCommandCallbackType)( [](EditLine *editline, int ch) { return Editline::InstanceFor(editline)->BreakLineCommand(ch); })); +el_wset(m_editline, EL_ADDFN, EditLineConstString("lldb-end-or-add-line"), +EditLineConstString("End editing or continue when incomplete"), +(EditlineCommandCallbackType)( +[](EditLine *editli
[Lldb-commits] [lldb] r275482 - Editing multi-line content in a terminal environment involves a lot of
Author: kate Date: Thu Jul 14 17:00:04 2016 New Revision: 275482 URL: http://llvm.org/viewvc/llvm-project?rev=275482&view=rev Log: Editing multi-line content in a terminal environment involves a lot of trade-offs. When LLDB's multi-line editing support was first introduced for expressions / REPL contexts the behavior was as follows: * The Return key is treated as a line-break except at the end of the input buffer, where a completeness test is applied This worked well enough when writing code, and makes it trivial to insert new lines above code you've already typed. Just use cursor navigation to move up and type freely. Where it was awkward is that the gesture to insert a line break and end editing is conflated for most people. Sometimes you want Return to end the editing session and other times you want to insert a line break. This commit changes the behavior as follows: * The Return key is treated as the end of editing except at the end of the input buffer, where a completeness test is applied * The Meta+Return sequence is always treated as a line break. This is consistent with conventions in Facebook and elsewhere since Alt/Option+Return is often mapped to Meta+Return. The unfortunate exception is on macOS where this *can* be the case, but isn't by default. Sigh. Note that by design both before and after the patch pasting a Return character always introduces a line break. Modified: lldb/trunk/include/lldb/Host/Editline.h lldb/trunk/source/Host/common/Editline.cpp Modified: lldb/trunk/include/lldb/Host/Editline.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Editline.h?rev=275482&r1=275481&r2=275482&view=diff == --- lldb/trunk/include/lldb/Host/Editline.h (original) +++ lldb/trunk/include/lldb/Host/Editline.h Thu Jul 14 17:00:04 2016 @@ -279,11 +279,15 @@ namespace lldb_private { /// Prompt implementation for EditLine. const char * Prompt(); - -/// Line break command used when return is pressed in multi-line mode. + +/// Line break command used when meta+return is pressed in multi-line mode. unsigned char BreakLineCommand (int ch); - + +/// Command used when return is pressed in multi-line mode. +unsigned char +EndOrAddLineCommand(int ch); + /// Delete command used when delete is pressed in multi-line mode. unsigned char DeleteNextCharCommand (int ch); @@ -299,7 +303,15 @@ namespace lldb_private { /// Line navigation command used when ^N or down arrow are pressed in multi-line mode. unsigned char NextLineCommand (int ch); - + +/// History navigation command used when Alt + up arrow is pressed in multi-line mode. +unsigned char +PreviousHistoryCommand(int ch); + +/// History navigation command used when Alt + down arrow is pressed in multi-line mode. +unsigned char +NextHistoryCommand(int ch); + /// Buffer start command used when Esc < is typed in multi-line emacs mode. unsigned char BufferStartCommand (int ch); Modified: lldb/trunk/source/Host/common/Editline.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=275482&r1=275481&r2=275482&view=diff == --- lldb/trunk/source/Host/common/Editline.cpp (original) +++ lldb/trunk/source/Host/common/Editline.cpp Thu Jul 14 17:00:04 2016 @@ -657,41 +657,9 @@ Editline::BreakLineCommand (int ch) // Establish the new cursor position at the start of a line when inserting a line break m_revert_cursor_index = 0; -// Don't perform end of input detection or automatic formatting when pasting +// Don't perform automatic formatting when pasting if (!IsInputPending (m_input_file)) { -// If this is the end of the last line, treat this as a potential exit -if (m_current_line_index == m_input_lines.size() - 1 && new_line_fragment.length() == 0) -{ -bool end_of_input = true; -if (m_is_input_complete_callback) -{ -SaveEditedLine(); -auto lines = GetInputAsStringList(); -end_of_input = m_is_input_complete_callback (this, lines, m_is_input_complete_callback_baton); - -// The completion test is allowed to change the input lines when complete -if (end_of_input) -{ -m_input_lines.clear(); -for (unsigned index = 0; index < lines.GetSize(); index++) -{ -#if LLDB_EDITLINE_USE_WCHAR -m_input_lines.insert (m_input_lines.end(), m_utf8conv.from_bytes (lines[index])); -#else -m_input_lines.insert (m_input_lines.end()
Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)
k8stone added a comment. Fair enough! I was planning to close both out tomorrow after getting Jim to approve the other patch. https://reviews.llvm.org/D22284 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r279315 - Moved #include for lldb-python.h to a distinct group with a reminder comment
Author: kate Date: Fri Aug 19 15:44:07 2016 New Revision: 279315 URL: http://llvm.org/viewvc/llvm-project?rev=279315&view=rev Log: Moved #include for lldb-python.h to a distinct group with a reminder comment declaring that it must be first. Failure to do so results in build failures on macOS due to subtle header conflicts. Added: lldb/trunk/packages/Python/lldbsuite/.clang-format Modified: lldb/trunk/.clang-format lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Modified: lldb/trunk/.clang-format URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/.clang-format?rev=279315&r1=279314&r2=279315&view=diff == --- lldb/trunk/.clang-format (original) +++ lldb/trunk/.clang-format Fri Aug 19 15:44:07 2016 @@ -1,9 +1 @@ BasedOnStyle: LLVM -IndentWidth: 4 -ColumnLimit: 120 -BreakBeforeBraces: Allman -AlwaysBreakAfterReturnType: All -AllowShortFunctionsOnASingleLine: Inline -ConstructorInitializerAllOnOneLineOrOnePerLine: true -IndentCaseLabels: true -AccessModifierOffset: -4 Added: lldb/trunk/packages/Python/lldbsuite/.clang-format URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/.clang-format?rev=279315&view=auto == --- lldb/trunk/packages/Python/lldbsuite/.clang-format (added) +++ lldb/trunk/packages/Python/lldbsuite/.clang-format Fri Aug 19 15:44:07 2016 @@ -0,0 +1,4 @@ +DisableFormat: true + +# Disabling formatting doesn't implicitly disable include sorting +SortIncludes: false Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h?rev=279315&r1=279314&r2=279315&view=diff == --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h Fri Aug 19 15:44:07 2016 @@ -12,11 +12,13 @@ #ifndef LLDB_DISABLE_PYTHON +// LLDB Python header must be included first +#include "lldb-python.h" + // C Includes // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb-python.h" #include "lldb/Core/ConstString.h" #include "lldb/Core/Flags.h" #include "lldb/Core/StructuredData.h" Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp?rev=279315&r1=279314&r2=279315&view=diff == --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp Fri Aug 19 15:44:07 2016 @@ -9,7 +9,9 @@ #ifndef LLDB_DISABLE_PYTHON +// LLDB Python header must be included first #include "lldb-python.h" + #include "PythonExceptionState.h" #include "llvm/ADT/StringRef.h" Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=279315&r1=279314&r2=279315&view=diff == --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Fri Aug 19 15:44:07 2016 @@ -13,7 +13,9 @@ #else +// LLDB Python header must be included first #include "lldb-python.h" + #include "ScriptInterpreterPython.h" #include "PythonDataObjects.h" #include "PythonExceptionState.h" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r279316 - Reverted premature changes to .clang-format
Author: kate Date: Fri Aug 19 15:46:37 2016 New Revision: 279316 URL: http://llvm.org/viewvc/llvm-project?rev=279316&view=rev Log: Reverted premature changes to .clang-format Removed: lldb/trunk/packages/Python/lldbsuite/.clang-format Modified: lldb/trunk/.clang-format Modified: lldb/trunk/.clang-format URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/.clang-format?rev=279316&r1=279315&r2=279316&view=diff == --- lldb/trunk/.clang-format (original) +++ lldb/trunk/.clang-format Fri Aug 19 15:46:37 2016 @@ -1 +1,9 @@ BasedOnStyle: LLVM +IndentWidth: 4 +ColumnLimit: 120 +BreakBeforeBraces: Allman +AlwaysBreakAfterReturnType: All +AllowShortFunctionsOnASingleLine: Inline +ConstructorInitializerAllOnOneLineOrOnePerLine: true +IndentCaseLabels: true +AccessModifierOffset: -4 Removed: lldb/trunk/packages/Python/lldbsuite/.clang-format URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/.clang-format?rev=279315&view=auto == --- lldb/trunk/packages/Python/lldbsuite/.clang-format (original) +++ lldb/trunk/packages/Python/lldbsuite/.clang-format (removed) @@ -1,4 +0,0 @@ -DisableFormat: true - -# Disabling formatting doesn't implicitly disable include sorting -SortIncludes: false ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [Project] LLDB
k8stone added a member: lldb-commits. PROJECT DETAIL https://reviews.llvm.org/project/profile/39/ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22286: [LLDB] Help text overhaul
k8stone accepted this revision. k8stone added a reviewer: k8stone. k8stone added a comment. All changes long since accepted and submitted to trunk. https://reviews.llvm.org/D22286 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280721 - Updated .clang-format rules so bring LLDB in line with LLVM standards.
Author: kate Date: Tue Sep 6 12:19:00 2016 New Revision: 280721 URL: http://llvm.org/viewvc/llvm-project?rev=280721&view=rev Log: Updated .clang-format rules so bring LLDB in line with LLVM standards. Added: lldb/trunk/packages/Python/lldbsuite/.clang-format Modified: lldb/trunk/.clang-format Modified: lldb/trunk/.clang-format URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/.clang-format?rev=280721&r1=280720&r2=280721&view=diff == --- lldb/trunk/.clang-format (original) +++ lldb/trunk/.clang-format Tue Sep 6 12:19:00 2016 @@ -1,9 +1 @@ BasedOnStyle: LLVM -IndentWidth: 4 -ColumnLimit: 120 -BreakBeforeBraces: Allman -AlwaysBreakAfterReturnType: All -AllowShortFunctionsOnASingleLine: Inline -ConstructorInitializerAllOnOneLineOrOnePerLine: true -IndentCaseLabels: true -AccessModifierOffset: -4 Added: lldb/trunk/packages/Python/lldbsuite/.clang-format URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/.clang-format?rev=280721&view=auto == --- lldb/trunk/packages/Python/lldbsuite/.clang-format (added) +++ lldb/trunk/packages/Python/lldbsuite/.clang-format Tue Sep 6 12:19:00 2016 @@ -0,0 +1,4 @@ +DisableFormat: true + +# Disabling formatting doesn't implicitly disable include sorting +SortIncludes: false ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24293: Use llvm's demangler
k8stone added a comment. Glad to see this change. Maintaining another copy of the same demangler in LLDB is definitely unnecessary. https://reviews.llvm.org/D24293 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255548 - [Editline] Redesign automatic indentation fix command for robustness
Author: kate Date: Mon Dec 14 15:43:59 2015 New Revision: 255548 URL: http://llvm.org/viewvc/llvm-project?rev=255548&view=rev Log: [Editline] Redesign automatic indentation fix command for robustness The FixIndentationCommand implementation has proven to be fragile across various libedit iterations. This patch reworks the command to use the same basic strategy as when moving between lines in a multi-line edit session: when indentation changes are required, exit line editing completely and restart with amended content. This approach won't be susceptible to subtle behavior differences libedit has introduced over time. Modified: lldb/trunk/source/Host/common/Editline.cpp Modified: lldb/trunk/source/Host/common/Editline.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=255548&r1=255547&r2=255548&view=diff == --- lldb/trunk/source/Host/common/Editline.cpp (original) +++ lldb/trunk/source/Host/common/Editline.cpp Mon Dec 14 15:43:59 2015 @@ -863,37 +863,50 @@ Editline::NextLineCommand (int ch) unsigned char Editline::FixIndentationCommand (int ch) { -if (!m_fix_indentation_callback) +if (!m_fix_indentation_callback) return CC_NORM; - -// Insert the character by hand prior to correction + +// Insert the character typed before proceeding EditLineCharType inserted[] = { (EditLineCharType)ch, 0 }; el_winsertstr (m_editline, inserted); -SaveEditedLine(); -StringList lines = GetInputAsStringList (m_current_line_index + 1); - -// Determine the cursor position LineInfoW * info = const_cast(el_wline (m_editline)); int cursor_position = info->cursor - info->buffer; - + +// Save the edits and determine the correct indentation level +SaveEditedLine(); +StringList lines = GetInputAsStringList (m_current_line_index + 1); int indent_correction = m_fix_indentation_callback (this, lines, cursor_position, m_fix_indentation_callback_baton); - -// Adjust the input buffer to correct indentation + +// If it is already correct no special work is needed +if (indent_correction == 0) +return CC_REFRESH; + +// Change the indentation level of the line +std::string currentLine = lines.GetStringAtIndex (m_current_line_index); if (indent_correction > 0) { -info->cursor = info->buffer; -el_winsertstr (m_editline, EditLineStringType (indent_correction, EditLineCharType(' ')).c_str()); +currentLine = currentLine.insert (0, indent_correction, ' '); } -else if (indent_correction < 0) +else { -// Delete characters for the unindentation AND including the character we just added. -el_wdeletestr (m_editline, -indent_correction + 1); - -// Rewrite the character that caused the unindentation. -el_winsertstr (m_editline, inserted); +currentLine = currentLine.erase (0, -indent_correction); } -info->cursor = info->buffer + cursor_position + indent_correction; -return CC_REFRESH; +#if LLDB_EDITLINE_USE_WCHAR +m_input_lines[m_current_line_index] = m_utf8conv.from_bytes (currentLine); +#else +m_input_lines[m_current_line_index] = currentLine; +#endif + +// Update the display to reflect the change +MoveCursor (CursorLocation::EditingCursor, CursorLocation::EditingPrompt); +DisplayInput (m_current_line_index); + +// Reposition the cursor back on the original line and prepare to restart editing +// with a new cursor position +SetCurrentLine (m_current_line_index); +MoveCursor (CursorLocation::BlockEnd, CursorLocation::EditingPrompt); +m_revert_cursor_index = cursor_position + indent_correction; +return CC_NEWLINE; } unsigned char ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255568 - [Test] Addresses failing test when path to make contains spaces
Author: kate Date: Mon Dec 14 16:59:26 2015 New Revision: 255568 URL: http://llvm.org/viewvc/llvm-project?rev=255568&view=rev Log: [Test] Addresses failing test when path to make contains spaces Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk?rev=255568&r1=255567&r2=255568&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk Mon Dec 14 16:59:26 2015 @@ -17,7 +17,7 @@ include $(LEVEL)/Makefile.rules $(DYLIB_FILENAME): lib_b lib_b: - $(MAKE) -f b.mk + "$(MAKE)" -f b.mk clean:: - $(MAKE) -f b.mk clean + "$(MAKE)" -f b.mk clean ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255868 - Set the minimum stack size for private state thread to 8MB
Author: kate Date: Wed Dec 16 19:37:00 2015 New Revision: 255868 URL: http://llvm.org/viewvc/llvm-project?rev=255868&view=rev Log: Set the minimum stack size for private state thread to 8MB Demangling complex Boost symbols can exhaust the default stack size. In practice, any thread that calls into LLDB functionality that touches symbols runs this risk. Guaranteeing a reasonable minimum for our own private state thread addressees some known scenarios debugging processes that make use of cpp-netlib. Modified: lldb/trunk/source/Target/Process.cpp Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=255868&r1=255867&r2=255868&view=diff == --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Wed Dec 16 19:37:00 2015 @@ -4070,7 +4070,7 @@ Process::StartPrivateStateThread (bool i // Create the private state thread, and start it running. PrivateStateThreadArgs args = {this, is_secondary_thread}; -m_private_state_thread = ThreadLauncher::LaunchThread(thread_name, Process::PrivateStateThread, (void *) &args, NULL); +m_private_state_thread = ThreadLauncher::LaunchThread(thread_name, Process::PrivateStateThread, (void *) &args, NULL, 8 * 1024 * 1024); if (m_private_state_thread.IsJoinable()) { ResumePrivateStateThread(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r256888 - Addresses an unsigned underflow situation that can occur when dumping an empty command history.
Author: kate Date: Tue Jan 5 18:33:07 2016 New Revision: 256888 URL: http://llvm.org/viewvc/llvm-project?rev=256888&view=rev Log: Addresses an unsigned underflow situation that can occur when dumping an empty command history. One example where this occurs in practice is starting the Swift REPL and typing ":command history" since REPL commands aren't stored in the LLDB command prompt history. Modified: lldb/trunk/source/Interpreter/CommandHistory.cpp Modified: lldb/trunk/source/Interpreter/CommandHistory.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandHistory.cpp?rev=256888&r1=256887&r2=256888&view=diff == --- lldb/trunk/source/Interpreter/CommandHistory.cpp (original) +++ lldb/trunk/source/Interpreter/CommandHistory.cpp Tue Jan 5 18:33:07 2016 @@ -130,9 +130,9 @@ CommandHistory::Dump (Stream& stream, size_t stop_idx) const { Mutex::Locker locker(m_mutex); -stop_idx = std::min(stop_idx, m_history.size() - 1); +stop_idx = std::min(stop_idx + 1, m_history.size()); for (size_t counter = start_idx; - counter <= stop_idx; + counter < stop_idx; counter++) { const std::string hist_item = m_history[counter]; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r266791 - Adds a test to detect when clang omits specialized generic types from debug information when using precompiled headers and -gmodules.
Author: kate Date: Tue Apr 19 13:20:11 2016 New Revision: 266791 URL: http://llvm.org/viewvc/llvm-project?rev=266791&view=rev Log: Adds a test to detect when clang omits specialized generic types from debug information when using precompiled headers and -gmodules. Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=266791&r1=266790&r2=266791&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Tue Apr 19 13:20:11 2016 @@ -15,6 +15,7 @@ import unittest2 # LLDB modules import use_lldb_suite +import lldbtest import lldb from . import configuration @@ -507,3 +508,16 @@ def skipUnlessCompilerRt(func): compilerRtPath = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "llvm","projects","compiler-rt") return "compiler-rt not found" if not os.path.exists(compilerRtPath) else None return skipTestIfFn(is_compiler_rt_missing)(func) + +def skipUnlessClangModules(): +"""Decorate the item to skip test unless Clang -gmodules flag is supported.""" +def is_compiler_clang_with_gmodules(self): +builder = lldbtest.builder_module() +compiler_path = builder.getCompiler() +compiler = os.path.basename(compiler_path) +if compiler != "clang": +return "Test requires clang as compiler" +clang_help = os.popen("%s --help" % (compiler_path)).read() +match = re.match(".* -gmodules ", clang_help, re.DOTALL) +return "Clang version doesn't support -gmodules flag" if not match else None +return skipTestIfFn(is_compiler_clang_with_gmodules) Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile?rev=266791&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile Tue Apr 19 13:20:11 2016 @@ -0,0 +1,7 @@ +LEVEL = ../../../make + +PCH_CXX_SOURCE = pch.h +CXX_SOURCES = main.cpp +CFLAGS_EXTRAS += $(MODULE_DEBUG_INFO_FLAGS) + +include $(LEVEL)/Makefile.rules Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py?rev=266791&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py Tue Apr 19 13:20:11 2016 @@ -0,0 +1,56 @@ +import lldb, os +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class TestWithGmodulesDebugInfo(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +@expectedFailureAll(bugnumber="llvm.org/pr27412") +@skipUnlessClangModules() +def test_specialized_typedef_from_pch(self): +clang_help = os.popen("clang --help").read() +match = re.match(".* -gmodules ", clang_help, re.DOTALL) +if not match: +self.skipTest("Clang version doesn't support -gmodules flag") +return + +self.build() +cwd = os.getcwd() + +src_file = os.path.join(cwd, "main.cpp") +src_file_spec = lldb.SBFileSpec(src_file) +self.assertTrue(src_file_spec.IsValid(), "breakpoint file") + +# Get the path of the executable +exe_path = os.path.join(cwd, 'a.out') + +# Load the executable +target = self.dbg.CreateTarget(exe_path) +self.assertTrue(target.IsValid(), VALID_TARGET) + +# Break on interesting line +breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec) +self.assertTrue(breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT) + +# Launch the process +process = target.LaunchSimple(None, None, self.get_process_working_directory()) +self.assertTrue(p
[Lldb-commits] [lldb] r266815 - Eliminate circular dependency introduced between lldbtest.py and decorators.py
Author: kate Date: Tue Apr 19 15:45:47 2016 New Revision: 266815 URL: http://llvm.org/viewvc/llvm-project?rev=266815&view=rev Log: Eliminate circular dependency introduced between lldbtest.py and decorators.py Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=266815&r1=266814&r2=266815&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Tue Apr 19 15:45:47 2016 @@ -15,7 +15,6 @@ import unittest2 # LLDB modules import use_lldb_suite -import lldbtest import lldb from . import configuration @@ -512,8 +511,8 @@ def skipUnlessCompilerRt(func): def skipUnlessClangModules(): """Decorate the item to skip test unless Clang -gmodules flag is supported.""" def is_compiler_clang_with_gmodules(self): -builder = lldbtest.builder_module() -compiler_path = builder.getCompiler() +compiler_path = self.getCompiler() +print(compiler_path) compiler = os.path.basename(compiler_path) if compiler != "clang": return "Test requires clang as compiler" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r266924 - Removed extraneous print() in decorator for enabling module debugging
Author: kate Date: Wed Apr 20 16:59:43 2016 New Revision: 266924 URL: http://llvm.org/viewvc/llvm-project?rev=266924&view=rev Log: Removed extraneous print() in decorator for enabling module debugging Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=266924&r1=266923&r2=266924&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Wed Apr 20 16:59:43 2016 @@ -509,7 +509,6 @@ def skipUnlessClangModules(): """Decorate the item to skip test unless Clang -gmodules flag is supported.""" def is_compiler_clang_with_gmodules(self): compiler_path = self.getCompiler() -print(compiler_path) compiler = os.path.basename(compiler_path) if compiler != "clang": return "Test requires clang as compiler" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r266940 - Added command prefix to new help messages to ensure that they're correctly words in REPL mode.
Author: kate Date: Wed Apr 20 19:55:20 2016 New Revision: 266940 URL: http://llvm.org/viewvc/llvm-project?rev=266940&view=rev Log: Added command prefix to new help messages to ensure that they're correctly words in REPL mode. Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=266940&r1=266939&r2=266940&view=diff == --- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Wed Apr 20 19:55:20 2016 @@ -35,22 +35,16 @@ CommandObjectHelp::GenerateAdditionalHel if (s && command && *command) { s->Printf("'%s' is not a known command.\n", command); -if (prefix && *prefix) -{ -s->Printf("Try '%shelp' to see a current list of commands.\n", prefix); -} -else -{ -s->PutCString("Try 'help' to see a current list of commands.\n"); -} - +s->Printf("Try '%shelp' to see a current list of commands.\n", prefix ? prefix : ""); if (include_apropos) { -s->Printf("Try 'apropos %s' for a list of related commands.\n", subcommand ? subcommand : command); + s->Printf("Try '%sapropos %s' for a list of related commands.\n", +prefix ? prefix : "", subcommand ? subcommand : command); } if (include_type_lookup) { -s->Printf("Try 'type lookup %s' for information on types, methods, functions, modules, etc.", subcommand ? subcommand : command); +s->Printf("Try '%stype lookup %s' for information on types, methods, functions, modules, etc.", + prefix ? prefix : "", subcommand ? subcommand : command); } } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r266941 - Corrected wording of REPL not available messaging (contained a repeated word and lacked clarity.)
Author: kate Date: Wed Apr 20 19:56:08 2016 New Revision: 266941 URL: http://llvm.org/viewvc/llvm-project?rev=266941&view=rev Log: Corrected wording of REPL not available messaging (contained a repeated word and lacked clarity.) Modified: lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Target/Target.cpp Modified: lldb/trunk/source/Core/Debugger.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=266941&r1=266940&r2=266941&view=diff == --- lldb/trunk/source/Core/Debugger.cpp (original) +++ lldb/trunk/source/Core/Debugger.cpp Wed Apr 20 19:56:08 2016 @@ -1812,7 +1812,7 @@ Debugger::RunREPL (LanguageType language } else if (repl_languages.empty()) { -err.SetErrorStringWithFormat("LLDB isn't configured with support support for any REPLs."); +err.SetErrorStringWithFormat("LLDB isn't configured with REPL support for any languages."); return err; } else Modified: lldb/trunk/source/Target/Target.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=266941&r1=266940&r2=266941&view=diff == --- lldb/trunk/source/Target/Target.cpp (original) +++ lldb/trunk/source/Target/Target.cpp Wed Apr 20 19:56:08 2016 @@ -222,7 +222,7 @@ Target::GetREPL (Error &err, lldb::Langu } else if (repl_languages.size() == 0) { -err.SetErrorStringWithFormat("LLDB isn't configured with support support for any REPLs."); +err.SetErrorStringWithFormat("LLDB isn't configured with REPL support for any languages."); return REPLSP(); } else ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits