gpt4 book ai didi

c - Visual Studio : "No source file" in Disassembly

转载 作者:行者123 更新时间:2023-11-30 20:35:51 24 4
gpt4 key购买 nike

我对 C 编程很陌生,所以如果我的问题不是很清楚,我很抱歉,但我在 Visual Studio 中遇到了以下问题:

我正在尝试调试项目中的函数,但是当我在其中放置断点时,我收到以下消息 -

"The breakpoint will not currently be hit. No symbols have been loaded for this document".

我已经检查了 Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document." 中提出的解决方案,但这些都不起作用。

我已经清理、重建、删除了任何可能导致问题的类似文件,但没有任何改善。所有符号也都正确加载。

当我在代码中调用该函数时,尽管无法介入,但我得到了输出,因此我打开了反汇编,我们将其称为 func1(),而不是我的函数,有另一个具有相似名称的函数 _func1(),我可以单步执行其汇编,但没有可用的源文件。

有什么想法如何找出 _func1() 位于何处,或者为什么首先我的初始函数没有被访问?

最佳答案

enable debugging :(还要确保在 Debug模式下构建程序)

1) Goto Project->HelloWorld Properties

2) On the left expand "Configuration Properties"

3) Expand "C/C++"

4) On the left, Select "General"

5) On the right, change "Debug Information Format" to "Program Database For Edit And Continue (/ZI)"

5) On the left, Select "Optimization"

6) On the right, change "Optimization" to "Disabled (/Od)"

7) On the left, expand "Linker"

8) On the left, select "Debugging"

9) On the right, change "Generate Debug Info" to "Yes"

10) Click ok

11) Set your breakpoints

12) Rebuild your application

关于c - Visual Studio : "No source file" in Disassembly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37565546/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com