-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lldb] Add config and decorator for wide character support in Editline #66447
Merged
JDevlieghere
merged 1 commit into
llvm:main
from
JDevlieghere:jdevlieghere/editline_wchar
Sep 15, 2023
Merged
[lldb] Add config and decorator for wide character support in Editline #66447
JDevlieghere
merged 1 commit into
llvm:main
from
JDevlieghere:jdevlieghere/editline_wchar
Sep 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-lldb ChangesAdd a configuration entry for whether LLDB was configured with wide character support in Editline and use it in a decorator to guard the UTF-8 prompt test. -- Full diff: https://github.com//pull/66447.diff3 Files Affected:
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index 5562130aa34079c..6194862f8fe60f9 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -1027,6 +1027,10 @@ def skipIfEditlineSupportMissing(func): return _get_bool_config_skip_if_decorator("editline")(func) +def skipIfEditlineWideCharSupportMissing(func): + return _get_bool_config_skip_if_decorator("editline_wchar")(func) + + def skipIfFBSDVMCoreSupportMissing(func): return _get_bool_config_skip_if_decorator("fbsdvmcore")(func) diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 5328e079564f322..0c4b8ca1617abbe 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -781,6 +781,9 @@ SBStructuredData SBDebugger::GetBuildConfiguration() { AddBoolConfigEntry( *config_up, "editline", LLDB_ENABLE_LIBEDIT, "A boolean value that indicates if editline support is enabled in LLDB"); + AddBoolConfigEntry( + *config_up, "editline_wchar", LLDB_EDITLINE_USE_WCHAR, + "A boolean value that indicates if editline wide characters support is enabled in LLDB"); AddBoolConfigEntry( *config_up, "lzma", LLDB_ENABLE_LZMA, "A boolean value that indicates if lzma support is enabled in LLDB"); diff --git a/lldb/test/API/terminal/TestEditline.py b/lldb/test/API/terminal/TestEditline.py index 0c6d16ff66da04e..aa7d827e5994413 100644 --- a/lldb/test/API/terminal/TestEditline.py +++ b/lldb/test/API/terminal/TestEditline.py @@ -47,6 +47,7 @@ def test_left_right_arrow(self): @skipIfAsan @skipIfEditlineSupportMissing + @skipIfEditlineWideCharSupportMissing def test_prompt_unicode(self): """Test that we can use Unicode in the LLDB prompt.""" self.launch(use_colors=True, encoding="utf-8") |
mysterymath
reviewed
Sep 15, 2023
lldb/source/API/SBDebugger.cpp
Outdated
@@ -781,6 +781,9 @@ SBStructuredData SBDebugger::GetBuildConfiguration() { | |||
AddBoolConfigEntry( | |||
*config_up, "editline", LLDB_ENABLE_LIBEDIT, | |||
"A boolean value that indicates if editline support is enabled in LLDB"); | |||
AddBoolConfigEntry( | |||
*config_up, "editline_wchar", LLDB_EDITLINE_USE_WCHAR, | |||
"A boolean value that indicates if editline wide characters support is enabled in LLDB"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra space between "editline" and "wide"
mysterymath
approved these changes
Sep 15, 2023
Add a configuration entry for whether LLDB was configured with wide character support in Editline and use it in a decorator to guard the UTF-8 prompt test.
JDevlieghere
force-pushed
the
jdevlieghere/editline_wchar
branch
from
September 15, 2023 00:11
6e745a6
to
1d9a7f7
Compare
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this pull request
Sep 19, 2023
llvm#66447) Add a configuration entry for whether LLDB was configured with wide character support in Editline and use it in a decorator to guard the UTF-8 prompt test.
JDevlieghere
added a commit
to swiftlang/llvm-project
that referenced
this pull request
Oct 16, 2023
llvm#66447) Add a configuration entry for whether LLDB was configured with wide character support in Editline and use it in a decorator to guard the UTF-8 prompt test. (cherry picked from commit 111bc6f)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a configuration entry for whether LLDB was configured with wide character support in Editline and use it in a decorator to guard the UTF-8 prompt test.