[PATCH] D132240: [Coroutine][Debug] Add line and column number to suspension point id
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 08:53:34 PDT 2022
ChuanqiXu added a comment.
I haven't looked into the details.
It looks like we need to store some debug information as string for a coroutine. One concern is that if we generates too many debug informations which increases the binary size too much.
I thought to add such facilities in the debugger part. e.g., we can generate a map from the index the line number and store such pairs. The we could get these values in debugging scripts.
----
In the end, I didn't move on since I find it may not be so useful/worthful in my cases. For example, for a coroutine frame which has a continuation field, which records the continuation of this coroutine. For example, then the continuation part of a `bar` coroutine may refer to coro. And there generally only one `bar()` called in `coro()`, so we could get the suspended location. (This is not precise. But it is workable in out situations) I am not sure if your case won't use continuation in your coroutine type.
C++
Coro coro() {
co_await bar();
}
BTW, for the scripts to get the asynchronous stack, I have https://github.com/alibaba/async_simple/blob/main/dbg/LazyStack.py. This is for my coroutine type but I guess it is easy to edit it according to different coroutine types. Hope this helpful.
And I think it may be better to discuss such topics in https://discourse.llvm.org so that more people could know this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132240/new/
https://reviews.llvm.org/D132240
More information about the llvm-commits
mailing list