[Lldb-commits] [lldb] [LLDB] Display artificial __promise and __coro_frame variables. (PR #71928)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 13 00:38:05 PST 2023


================
@@ -78,8 +78,19 @@ def do_test(self, stdlib_type):
                 ],
             )
 
-        # Run until after the `co_yield`
         process = self.process()
+
+        # Break at a coroutine body
+        lldbutil.continue_to_source_breakpoint(
+          self, process, "// Break at co_yield", lldb.SBFileSpec("main.cpp", False)
----------------
Michael137 wrote:

I meant you can just do
```
 lldbutil.continue_to_source_breakpoint(
          self, process, "int_generator my_generator_func", lldb.SBFileSpec("main.cpp", False)
```
Or sometimes we put something like `std::puts("Break here");` into the source, instead of relying on comments.

> BTW, this file is using this continue_to_source_breakpoint  pattern in other places, I was following this pattern.

Yup, it isn't very strictly enforced. Also it isn't part of the LLDB testing guidelines. Maybe it should be

https://github.com/llvm/llvm-project/pull/71928


More information about the lldb-commits mailing list