Linux、调试、跟踪

发布于 2024-12-21 01:37:52 字数 246 浏览 1 评论 0原文

描述断言宏的工作原理以及如何在程序中使用它,以及其输出的目标用户。 与直接在代码中使用 fprintf 或 printf 进行调试相比,课堂上讨论和演示的 TRACE 宏有什么优势? 解释 TRACE 宏输出何时以及如何“打开”(启用)或“关闭”(禁用)。如果有不止一种方法可以做到这一点,那么哪种方法是“最好的”,为什么? 与使用 TRACE 宏进行调试相比,课堂上讨论和演示的 DEBUG 宏包有什么优势?

明天期末考试有任何帮助,这些是额外的学分问题,谢谢

Describe how the assert macro works and how you use it in a program, and who its output is intended for.
What advantage does the TRACE macro discussed and demonstrated in class have over debugging with just fprintf or printf directly in your code?
Explain when and how the TRACE macro output is “turned on” (enabled” or “turned off” (disabled). If there is more than one way to do it, which is “best”, and why?
What advantage does the DEBUG macro package discussed and demonstrated in class have over debugging with the TRACE macro?

any help final tomorrow and these are extra credit questions thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

命比纸薄 2024-12-28 01:37:52

你真的应该学会自己寻找。如果你不费吹灰之力就要求别人做你的作业,你就输了(我们无法帮助 TRACEDEBUG,它不是标准的,我们不知道您对它们的定义)。

您是否查看过 assert 手册页断言维基百科页面并放入您的 assert.h 头文件中(可能位于 /usr/include/至少在 Linux 上)??

You really should learn to find by yourself. You are losing by asking others to do your homework without any effort (and we can't help about TRACE or DEBUG, it is not standard and we don't know the definitions you have for them).

Did you look into assert man page and into assert wikipedia page and into your assert.h header file (probably under /usr/include/ at least on Linux) ??

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文