执行(能/ ing)代码处的无法到达的断点 [英] Unreachable breakpoint at execut(able/ing) code

查看:352
本文介绍了执行(能/ ing)代码处的无法到达的断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个DLL,一个用本地C ++编写,另一个用C ++ / CLI编写。前者被注入到一个过程中,并且在稍后的时间点,加载后者。在调试时,我注意到本机DLL的断点运行正常,而另一个没有,即使它的代码正在执行。

I've got two DLLs, one in written in native C++ and the other in C++/CLI. The former is injected into a process, and at a later point in time, loads the latter. While debugging, I noticed that the native DLL's breakpoints were functioning correctly while the other's weren't, even though its code was being executed.

断点显示此消息:不会命中此断点。没有与此行关联的可执行代码。可能的原因包括:预处理器指令或编译器/链接器优化。

The breakpoints showed this message: This breakpoint will not be hit. No executable code associated with this line. Possible causes include: preprocessor directives or compiler/linker optimizations.

模块窗口告诉我插件的符号已加载。我运行它的DEBUG构建。

The modules window tells me that the plugin's symbols are loaded. I'm running with its DEBUG build. Any ideas on why this is so and perhaps a fix ?

推荐答案

您所面对的原因是PDB(PDB代表程序数据库,专用文件格式(由Microsoft开发用于存储关于程序的调试信息)不是最新的。

The reason for what you faced is that the PDBs ("PDB stands for Program Database, a proprietary file format (developed by Microsoft) for storing debugging information about a program) are not up-to-date.

尝试清除解决方案(包含托管代码DLL),然后重新重建。

Try to clean the solution (that contains the managed code DLL) and rebuild it again.

提示:如果您要引用DLL,可以从bin文件夹中获取pdbs。

Tip: if you are referring to the DLL, try to put the up-to-date pdbs beside the it. You can get the pdbs from your bin folder.

这篇关于执行(能/ ing)代码处的无法到达的断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆