[Lldb-commits] [PATCH] D132624: [LLDB] Devirtualize coroutine promise types for `std::coroutine_handle`

Adrian Vogelsgesang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 26 07:05:27 PDT 2022


avogelsgesang added a comment.

> I don't know much about coroutines, but it seems like your goal is to format them like a linked list

actually, my preferred goal would be to show them as a logical, user-level thread. Such that you can type

  thread backtrace cxxcoro:0x55555555b2a0

to get the backtrace of the logical coroutine thread routed at the coroutine at address `0x55555555b2a0`, or maybe even

  thread backtrace cxxcoro:hdl

where `hdl` is evaluated as an expression to identify the coroutine handle from where to dump the backtrace.

Also, it would be neat if those logical threads show up in `thread list`...

But it seems there is currently no infrastructure yet in LLDB for logical threads provided by `LanguageRuntime` plugins.

I guess at some point, I will write an RFC about that on discourse. But before that, I will first do some more exploration on how LLDB works and I will first grab the low-hanging fruits (like a data formatter for `std::coroutine_handle` and patching LLVM to emit the necessary debug info)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132624



More information about the lldb-commits mailing list