Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need more debug tools. #225

Open
1 of 2 tasks
foreverhy opened this issue Nov 14, 2022 · 6 comments
Open
1 of 2 tasks

Need more debug tools. #225

foreverhy opened this issue Nov 14, 2022 · 6 comments

Comments

@foreverhy
Copy link
Collaborator

Search before asking

  • 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!
@ChuanqiXu9
Copy link
Collaborator

@foreverhy
Copy link
Collaborator Author

目前主要还是这几类 debug 的问题比较难用:

  1. gdb step 进入 coro 调用里
  2. gdb up/down 在 coro 间切换
  3. print 某个变量(local 或 class 成员变量)

@ChuanqiXu9
Copy link
Collaborator

目前主要还是这几类 debug 的问题比较难用:

  1. gdb step 进入 coro 调用里
  2. gdb up/down 在 coro 间切换
  3. print 某个变量(local 或 class 成员变量)

1 和 2 在原理上没法实现,因为异步执行的话很可能执行的栈帧已经不在栈上了。3 的话 clang15(或内部 clang13) 配合这个文档在 debug 模式下应该是可以完全支持的;在 Release 模式下的话,也能看到优化后的值,但可能这个名字和前端的名字就可能对不上了

@ChuanqiXu9
Copy link
Collaborator

优化的情况可以看看这个文档:https://clang.llvm.org/docs/DebuggingCoroutines.html#examples-to-print-coroutine-frames

@4kangjc
Copy link
Collaborator

4kangjc commented Nov 14, 2022

uthread有gdb脚本么

@ChuanqiXu9
Copy link
Collaborator

uthread有gdb脚本么

uthread 不需要吧,按原来的就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants