Skip to content

[lldb] Add config and decorator for wide character support in Editline #66447

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

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lldb/packages/Python/lldbsuite/test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions lldb/source/API/SBDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/terminal/TestEditline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down