[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-21 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/123430 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-21 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/123430 >From 10e89226a485d73acfb07ad6d72f3004d270a2f5 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 17 Jan 2025 16:51:21 -0800 Subject: [PATCH 1/4] [lldb] Support format string in the prompt Impleme

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-21 Thread via lldb-commits
@@ -171,7 +171,45 @@ inline std::string FormatAnsiTerminalCodes(llvm::StringRef format, } return fmt; } + +inline std::string StripAnsiTerminalCodes(llvm::StringRef str) { + std::string stripped; + while (!str.empty()) { +llvm::StringRef left, right; + +std::tie(

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-20 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/123430 >From 10e89226a485d73acfb07ad6d72f3004d270a2f5 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 17 Jan 2025 16:51:21 -0800 Subject: [PATCH 1/2] [lldb] Support format string in the prompt Impleme

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-20 Thread Jonas Devlieghere via lldb-commits
@@ -171,7 +171,45 @@ inline std::string FormatAnsiTerminalCodes(llvm::StringRef format, } return fmt; } + +inline std::string StripAnsiTerminalCodes(llvm::StringRef str) { + std::string stripped; + while (!str.empty()) { +llvm::StringRef left, right; + +std::tie(

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-19 Thread Pavel Labath via lldb-commits
@@ -69,6 +69,22 @@ def test_prompt_color(self): # Column: 16.8 self.child.expect(re.escape("\x1b[31m(lldb) \x1b[0m\x1b[8G")) +@skipIfAsan +@skipIfEditlineSupportMissing +def test_prompt_format_color(self): +"""Test that we can change the

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-19 Thread Pavel Labath via lldb-commits
@@ -171,7 +171,45 @@ inline std::string FormatAnsiTerminalCodes(llvm::StringRef format, } return fmt; } + +inline std::string StripAnsiTerminalCodes(llvm::StringRef str) { + std::string stripped; + while (!str.empty()) { +llvm::StringRef left, right; + +std::tie(

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-19 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/123430 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-19 Thread Pavel Labath via lldb-commits
@@ -69,6 +69,22 @@ def test_prompt_color(self): # Column: 16.8 self.child.expect(re.escape("\x1b[31m(lldb) \x1b[0m\x1b[8G")) +@skipIfAsan +@skipIfEditlineSupportMissing +def test_prompt_format_color(self): +"""Test that we can change the

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-17 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: I need the same functionality for the Statusline (https://github.com/llvm/llvm-project/pull/121860) so I've factored this out into its own PR. https://github.com/llvm/llvm-project/pull/123430 ___ lldb-commits mailing list lldb-co

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) Changes Implement ansi::StripAnsiTerminalCodes and fix a long standing bug where using format strings in lldb's prompt resulted in an incorrect prompt column width. --- Full diff: https://github.com/llvm/ll

[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

2025-01-17 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/123430 Implement ansi::StripAnsiTerminalCodes and fix a long standing bug where using format strings in lldb's prompt resulted in an incorrect prompt column width. >From 10e89226a485d73acfb07ad6d72f3004d270a2f5 M