如何让 Very Sleepy 探查器识别 C++ 中的函数名称二进制?
我有一个使用 Visual Studio 2010 构建的混合 C#/托管 C++/非托管 C++ 的工具。代码实际上分布在 .exe(我将其称为 mybinary.exe)和 .dll (mylib.dll) 中
。我们在项目上设置了 dll 和 exe 的构建设置,以便在发布版本中生成 PDB 文件。我已经确保 PDB 文件与 exe 和 pdb 位于同一目录中。但是当我调试该程序时,我仍然看不到函数的名称;我只看到地址。以下是当我在 Very Sleepy 的第一个屏幕中选择程序时,我在底部的小状态栏中得到的相关摘录:
DBGHELP: mybinary.vshost - public symbols
C:\Users\(me)\AppData\Local\sleepy\vshost32-clr2.pdb\(long hex string)\vshost32-clr2.pdb
...
DBGHELP: No debug info for C:\myproj\mylib.dll. Searching for dbg file
DBGHELP: C:\myproj\mylib.dbg - file not found
DBGHELP: C:\myproj\dll\mylib.dbg - path not found
DBGHELP: C:\myproj\symbols\dll\mylib.dbg - path not found
SYMSRV: C:\Users\peastlund\AppData\Local\sleepy\mylib.dbg\4EF1F48B13c000\mylib.dbg not found
DBGHELP: C:\myproj\mylib.dbg - file not found
DBGHELP: C:\myproj\dll\mylib.dbg - path not found
DBGHELP: C:\myproj\symbols\dll\mylib.dbg - path not found
DBGHELP: C:\myproj\mylib.dbg - file not found
DBGHELP: C:\myproj\mylib.dll missing debug info. Searching for pdb anyway
DBGHELP: mylib - public symbols
C:\myproj\mylib.pdb - unmatched
...
DBGHELP: MOD: mybinary.vshost
...
DBGHELP: mybinary - private symbols & lines
C:\myproj\mybinary.pdb
因此,看起来 mylib.pdb 与 mylib.dll 匹配时出现问题,出于某种原因,我'我不清楚,但我会注意到我也没有获得来自 mybinary.exe 的函数的正确地址。我有一台新计算机,并且最近安装了所有内容,因此这不是“某些库已经过时”的问题。
如果有人可以提供帮助,我们将不胜感激!
编辑:实际上事实证明这并不是特定于优化代码的。其他分析器在优化 C++ 方面存在一些问题,这就是我切换到 Very Sleepy 的原因,但在测试中我现在意识到,使用 Very Sleepy 时,即使在调试模式下编译,我似乎也无法获取函数名称。
I have a tool that is mixed C#/managed C++/unmanaged C++ built with Visual Studio 2010. Code is actually spread across an .exe (I'll call it mybinary.exe) and a .dll (mylib.dll.)
I've set the build settings on the project for the dll and the exe in order to generate PDB files in release builds. I've made sure the PDB files are both in the same directory that the exe and pdb are in. But I still don't see the names of functions when I debug this program; I just see addresses. Here's the relevant excerpt of what I get in the little status bar at the bottom when I select the program in the first screen of Very Sleepy:
DBGHELP: mybinary.vshost - public symbols
C:\Users\(me)\AppData\Local\sleepy\vshost32-clr2.pdb\(long hex string)\vshost32-clr2.pdb
...
DBGHELP: No debug info for C:\myproj\mylib.dll. Searching for dbg file
DBGHELP: C:\myproj\mylib.dbg - file not found
DBGHELP: C:\myproj\dll\mylib.dbg - path not found
DBGHELP: C:\myproj\symbols\dll\mylib.dbg - path not found
SYMSRV: C:\Users\peastlund\AppData\Local\sleepy\mylib.dbg\4EF1F48B13c000\mylib.dbg not found
DBGHELP: C:\myproj\mylib.dbg - file not found
DBGHELP: C:\myproj\dll\mylib.dbg - path not found
DBGHELP: C:\myproj\symbols\dll\mylib.dbg - path not found
DBGHELP: C:\myproj\mylib.dbg - file not found
DBGHELP: C:\myproj\mylib.dll missing debug info. Searching for pdb anyway
DBGHELP: mylib - public symbols
C:\myproj\mylib.pdb - unmatched
...
DBGHELP: MOD: mybinary.vshost
...
DBGHELP: mybinary - private symbols & lines
C:\myproj\mybinary.pdb
So it looks like there's a problem matching mylib.pdb to mylib.dll, for some reason I'm unclear on, but I'll note that I don't get proper addresses for functions that are from mybinary.exe either. I have a new computer with all-recent installs so this isn't a "some library is way outdated" problem.
Much appreciated if anyone can assist with this!
EDIT: Actually it turns out this is not specific to optimized code. Other profilers had some issues with optimized C++, which is why I switched to Very Sleepy, but on testing I realize now that with Very Sleepy I don't seem to be able to get function names even when I compile in debug mode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保以下各项:
Ensure the following: