[Lldb-commits] [lldb] [lldb] add a marker before skipped frames (PR #167550)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 16 13:46:01 PST 2025
================
@@ -49,6 +49,22 @@ class StackFrameList : public std::enable_shared_from_this<StackFrameList> {
/// Resets the selected frame index of this object.
void ClearSelectedFrameIndex();
+ /// Returns \p true if the next frame is hidden.
+ bool IsNextFrameHidden(lldb_private::StackFrame &frame);
+
+ /// Returns \p true if the previous frame is hidden.
+ bool IsPreviousFrameHidden(lldb_private::StackFrame &frame);
+
+ /// Returns the stack frame marker depending on if \p frame_sp:
+ /// @li is selected: *
+ /// @li is the first non hidden frame: ﹍
+ /// @li is the last non hidden frame: ﹉
+ ///
+ /// If the terminal does not support Unicode rendering, the hidden frame
+ /// markers are replaced with whitespaces.
+ std::wstring FrameMarker(lldb::StackFrameSP frame_sp,
----------------
JDevlieghere wrote:
To the best of my knowledge, we don't pass around `std::wstring` anywhere in LLDB that isn't Windows specific. This would be the first place that we do.
Can you help me understand why that's necessary and why we can't do the same that we do elsewhere which is passing around UTF-8 strings and only convert them to UTF-16 at the very end? Dealing with Unicode is pretty hard as it is and I fully acknowledge that there's plenty of room for improvement in LLDB. However, I want to avoid having to add another level of complexity if it can be avoided and learn from what we've done in LLVM, which is pretty good about this stuff.
https://github.com/llvm/llvm-project/pull/167550
More information about the lldb-commits
mailing list