[PATCH] D127623: [Debug] [Coroutine] Adjust the scope and name for coroutine frame

Adrian Vogelsgesang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 02:00:54 PDT 2022


avogelsgesang added a comment.

Can we somehow achieve that for the source code

  std::lazy<int> my_coro_task_function(int x) {
       while (--x) {
            co_await do_something();
       }
       co_return;
  }

I can use

  (gdb) # 0x418eb0 is the address of a coroutine frame
  (gdb )p (my_coro_task_function::__coro_frame_ty)*0x418eb0

in the debugger?

As a user of clang/gdb, I do not want to deal with linkage names at all.
I would prefer if I could use the non-mangled function name and simply append `::__coro_frame_ty` to it.
In my mental model, the coroutine frame type is a function-specific name. As such, writing it as a type nested inside the function scope feels pretty natural to me...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127623/new/

https://reviews.llvm.org/D127623



More information about the llvm-commits mailing list