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

[Feature] include/rtdbg.h 中有些 debug API 可以清理了 #9783

Closed
unicornx opened this issue Dec 16, 2024 · 3 comments · Fixed by #9807
Closed

[Feature] include/rtdbg.h 中有些 debug API 可以清理了 #9783

unicornx opened this issue Dec 16, 2024 · 3 comments · Fixed by #9807
Assignees
Labels
Kernel PR has src relate code

Comments

@unicornx
Copy link
Contributor

unicornx commented Dec 16, 2024

Describe problem solved by the proposed feature

  • dbg_here
  • dbg_enter
  • dbg_exit

上面这三个感觉是可以直接删除了,没有人用,而且也看不出还有什么用?是历史遗迹吗?请各位看看是否可以删除?

  • dbg_log 这个我看了一下,注释中是说 “NOT RECOMMENDED API” 了,但是现在还有人使用,但也不多了,感觉整理一下也是可以用 LOG_D/LOG_E 替换掉了。各位看看是否也要清理掉?

Describe your preferred solution

No response

Describe possible alternatives

No response

@unicornx unicornx added the Kernel PR has src relate code label Dec 16, 2024
@unicornx unicornx self-assigned this Dec 16, 2024
@BernardXiong
Copy link
Member

应该都是一些便于调试使用的宏:

  • dbg_here 会自动输出行号位置,方便没调试器的状态下来追踪代码运行情况,以确定代码已经执行过了,而不是莫名其妙挂死了;
  • dbg_enter 应该是函数进入了;
  • dbg_exit 应该是函数离开了;

都是一些调试时的宏。

@unicornx
Copy link
Contributor Author

应该都是一些便于调试使用的宏:

  • dbg_here 会自动输出行号位置,方便没调试器的状态下来追踪代码运行情况,以确定代码已经执行过了,而不是莫名其妙挂死了;
  • dbg_enter 应该是函数进入了;
  • dbg_exit 应该是函数离开了;

都是一些调试时的宏。

@BernardXiong 所以您的建议是还是保留这三个宏?我搜了一下已经没有人用了哎。

另外 dbg_log 是否值得清理一下呢?

我的想法是这些 dbg_xxx 的宏如果没有人用或者不推荐用,所以都清理掉算了,目前 rtdbg.h 这个文件看着有点冗长。

@BernardXiong
Copy link
Member

清理掉,感觉关系也不大

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kernel PR has src relate code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants