[Lldb-commits] [lldb] [lldb] Remove lldbutil.get_stack_frames (NFC) (PR #117505)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 24 11:12:00 PST 2024
https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/117505
None
>From eda4536f9e9edcb36c64592f4afd7820c81d65f3 Mon Sep 17 00:00:00 2001
From: Dave Lee <davelee.com at gmail.com>
Date: Sun, 24 Nov 2024 11:10:35 -0800
Subject: [PATCH] [lldb] Remove lldbutil.get_stack_frames (NFC)
---
lldb/packages/Python/lldbsuite/test/lldbutil.py | 11 -----------
.../shared_library/TestSharedLibOnDemand.py | 4 ++--
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index 660a3c085a908a..07b5f8cc7d900b 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -1158,17 +1158,6 @@ def GetModuleName(i):
return list(map(GetModuleName, list(range(thread.GetNumFrames()))))
-def get_stack_frames(thread):
- """
- Returns a sequence of stack frames for this thread.
- """
-
- def GetStackFrame(i):
- return thread.GetFrameAtIndex(i)
-
- return list(map(GetStackFrame, list(range(thread.GetNumFrames()))))
-
-
def print_stacktrace(thread, string_buffer=False):
"""Prints a simple stack trace of this thread."""
diff --git a/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py b/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py
index f1c23a58d1f486..dbb9576ed4d51a 100644
--- a/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py
+++ b/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py
@@ -59,7 +59,7 @@ def test_source_line_breakpoint(self):
lldbutil.check_breakpoint(self, bpno=1, expected_hit_count=1)
thread = process.GetSelectedThread()
- stack_frames = lldbutil.get_stack_frames(thread)
+ stack_frames = thread.frames
self.assertGreater(len(stack_frames), 2)
leaf_frame = stack_frames[0]
@@ -97,7 +97,7 @@ def test_symbolic_breakpoint(self):
lldbutil.check_breakpoint(self, bpno=1, expected_hit_count=1)
thread = process.GetSelectedThread()
- stack_frames = lldbutil.get_stack_frames(thread)
+ stack_frames = thread.frames
self.assertGreater(len(stack_frames), 2)
leaf_frame = stack_frames[0]
More information about the lldb-commits
mailing list