[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Sun Aug 25 23:45:43 PDT 2024
================
@@ -0,0 +1,43 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class LibCxxStdFunctionRecognizerTestCase(TestBase):
+ NO_DEBUG_INFO_TESTCASE = True
+
+ @add_test_categories(["libc++"])
+ def test_frame_recognizer(self):
+ """Test that implementation details details of `std::invoke`"""
+ self.build()
+ (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+ self, "// break here", lldb.SBFileSpec("main.cpp")
+ )
+
+ while process.GetState() != lldb.eStateExited:
+ self.assertTrue(
+ any(
+ f in thread.GetFrameAtIndex(0).GetFunctionName()
+ for f in ["print_num", "add", "PrintAdder"]
+ )
+ )
+ print(thread.GetFrameAtIndex(0).GetFunctionName())
----------------
Michael137 wrote:
Are all these `print` statements just leftovers from debugging?
https://github.com/llvm/llvm-project/pull/105695
More information about the lldb-commits
mailing list