From f0bdd23bbeaa2c0d0b1042b973d6309450dc85fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 3 Apr 2022 15:25:10 +0200 Subject: [PATCH] [lldb][gui] use just '#2' instead of 'frame #2' in the threads/frame view Since the threads/frame view is taking only a small part on the right side of the screen, only a part of the function name of each frame is visible. It seems rather wasteful to spell out 'frame' there when it's obvious that it is a frame, it's better to use the space for more of the function name. Differential Revision: https://reviews.llvm.org/D122998 --- lldb/source/Core/IOHandlerCursesGUI.cpp | 3 +-- .../gui/expand-threads-tree/TestGuiExpandThreadsTree.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp index 8577f4b28297..7fc23292983f 100644 --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -5016,8 +5016,7 @@ class FrameTreeDelegate : public TreeDelegate { public: FrameTreeDelegate() : TreeDelegate() { FormatEntity::Parse( - "frame #${frame.index}: {${function.name}${function.pc-offset}}}", - m_format); + "#${frame.index}: {${function.name}${function.pc-offset}}}", m_format); } ~FrameTreeDelegate() override = default; diff --git a/lldb/test/API/commands/gui/expand-threads-tree/TestGuiExpandThreadsTree.py b/lldb/test/API/commands/gui/expand-threads-tree/TestGuiExpandThreadsTree.py index 9eed5b0ef6c3..34a6bf364353 100644 --- a/lldb/test/API/commands/gui/expand-threads-tree/TestGuiExpandThreadsTree.py +++ b/lldb/test/API/commands/gui/expand-threads-tree/TestGuiExpandThreadsTree.py @@ -33,7 +33,7 @@ def test_gui(self): self.child.expect_exact("Threads") # The thread running thread_start_routine should be expanded. - self.child.expect_exact("frame #0: break_here") + self.child.expect_exact("#0: break_here") # Exit GUI. self.child.send(escape_key) @@ -47,7 +47,7 @@ def test_gui(self): self.child.expect_exact("Threads") # The main thread should be expanded. - self.child.expect("frame #\d+: main") + self.child.expect("#\d+: main") # Quit the GUI self.child.send(escape_key)