[Lldb-commits] [PATCH] D124785: [lldb/Core] Fix "sticky" long progress messages
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 6 11:41:10 PDT 2022
JDevlieghere added inline comments.
================
Comment at: lldb/source/Core/Debugger.cpp:1873-1875
+ if (message.size() + prefix_width + suffix_width >= term_width)
+ message.erase(message.begin() + term_width - prefix_width - suffix_width,
+ message.end());
----------------
Instead of computing the length string like this, would it make sense to write the message to a temporary stream/buffer and then trim the string dumping it to the real async output stream? I'm worried about the two accidentally getting out of sync.
================
Comment at: lldb/test/API/functionalities/progress_reporting/TestTrimmedProgressReporting.py:25-34
+ self.launch(executable=self.getBuildArtifact("a.out"),
+ dimensions=(5,5), timeout=1)
+
+ # Now resize to something bigger
+ self.child.setwinsize(100,500)
+
+ patterns = ['Locating external symbol file for',
----------------
I don't understand how this guarantees that we cut off the string at the exact width of the window?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124785/new/
https://reviews.llvm.org/D124785
More information about the lldb-commits
mailing list