async_simple
async_simple copied to clipboard
Need more debug tools.
Search before asking
- [X] I searched the issues and found no similar issues.
What happened + What you expected to happen
Debugging Lazy<> is quite difficult since may commands are not well supported in gdb.
Reproduction way
Anything else
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
这个文档是可用的吗?https://github.com/alibaba/async_simple/blob/main/docs/docs.cn/调试%20Lazy.md
目前主要还是这几类 debug 的问题比较难用:
- gdb step 进入 coro 调用里
- gdb up/down 在 coro 间切换
- print 某个变量(local 或 class 成员变量)
目前主要还是这几类 debug 的问题比较难用:
- gdb step 进入 coro 调用里
- gdb up/down 在 coro 间切换
- print 某个变量(local 或 class 成员变量)
1 和 2 在原理上没法实现,因为异步执行的话很可能执行的栈帧已经不在栈上了。3 的话 clang15(或内部 clang13) 配合这个文档在 debug 模式下应该是可以完全支持的;在 Release 模式下的话,也能看到优化后的值,但可能这个名字和前端的名字就可能对不上了
优化的情况可以看看这个文档:https://clang.llvm.org/docs/DebuggingCoroutines.html#examples-to-print-coroutine-frames
uthread有gdb脚本么
uthread有gdb脚本么
uthread 不需要吧,按原来的就行了