Luke Stackwalker 运行时返回错误,gprof 工作正常
我习惯于使用 gprof
来分析我的 C 代码,但我想开始使用基于 GUI 的 Windows 应用程序,例如 Luke Stackwalker。 gprof
在我的二进制文件上工作得很好,但 Luke Stackwalker 有一些问题:
Launching executable C:\lshare\POT03\Eclipse\Debug\POTaak3.exe.
SymInit: Symbol-SearchPath: ';.;C:\Program Files\Luke Stackwalker;C:\Program Files\Luke Stackwalker;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Pieter'
OS-Version: 5.1.2600 (Service Pack 3) 0x100-0x1
C:\lshare\POT03\Eclipse\Debug\POTaak3.exe:POTaak3.exe (00400000), size: 61440, SymType: '-unknown-', PDB: '$Tƒ|'
C:\WINDOWS\system32\ntdll.dll:ntdll.dll (7C900000), size: 753664, SymType: '-unknown-', PDB: '©Uƒ|'
C:\WINDOWS\system32\kernel32.dll:kernel32.dll (7C7D0000), size: 1048576, SymType: '-unknown-', PDB: '©Uƒ|'
C:\WINDOWS\system32\msvcrt.dll:msvcrt.dll (77BE0000), size: 360448, SymType: '-unknown-', PDB: '©Uƒ|'
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 7C90E514)
Sorting profile data.
Done; 2 samples collected at 1.$ samples/second.
现在谁在什么情况下射杀了谁?我在这里做错了什么?我确实记得使用 -pg
标志。
I'm used to gprof
for profiling my C code, but I want to start using a GUI-based Windows application such as Luke Stackwalker. gprof
works perfectly fine on my binary, but Luke Stackwalker has some issues:
Launching executable C:\lshare\POT03\Eclipse\Debug\POTaak3.exe.
SymInit: Symbol-SearchPath: ';.;C:\Program Files\Luke Stackwalker;C:\Program Files\Luke Stackwalker;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Pieter'
OS-Version: 5.1.2600 (Service Pack 3) 0x100-0x1
C:\lshare\POT03\Eclipse\Debug\POTaak3.exe:POTaak3.exe (00400000), size: 61440, SymType: '-unknown-', PDB: '$Tƒ|'
C:\WINDOWS\system32\ntdll.dll:ntdll.dll (7C900000), size: 753664, SymType: '-unknown-', PDB: '©Uƒ|'
C:\WINDOWS\system32\kernel32.dll:kernel32.dll (7C7D0000), size: 1048576, SymType: '-unknown-', PDB: '©Uƒ|'
C:\WINDOWS\system32\msvcrt.dll:msvcrt.dll (77BE0000), size: 360448, SymType: '-unknown-', PDB: '©Uƒ|'
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 7C90E514)
Sorting profile data.
Done; 2 samples collected at 1.$ samples/second.
Who shot the who in the what now? What am I doing wrong here? I did remember to use the -pg
flag.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我理解为什么您想要除了gprof之外的东西。 Luke Stackwalker 获取了堆栈样本,但是(我上次检查时)它没有总结在代码行级别使用的挂钟时间的包含百分比。在Linux上,您可以使用lsstack或pstack,并且在Windows上必须有类似的工具。在您的情况下,我只是依靠 IDE 中的暂停按钮来获取 堆栈截图。
I understand why you want something other than gprof. Luke Stackwalker takes stack samples, but (last time I checked) it doesn't summarize inclusive % of wall-clock time used at the level of lines of code. On Linux, you could use lsstack or pstack, and there must be a similar tool on Windows. In your situation, I just rely on the pause button in the IDE to take stackshots.
SymType -unknown- 表示程序尚未使用 gcc -g 选项编译以生成调试信息,或者 Luke Stackwalker 使用的 microsoft debughelp 库无法识别调试信息格式。
请检查您在编译程序时是否使用了 -g 选项(而不是剥离可执行文件)。否则,最好知道您正在使用哪个 gcc 版本。
The SymType -unknown- means that either the program has not been compiled with the gcc -g option to generate debug info, or the debug info format cannot be recognized by the microsoft debughelp library that is used by Luke Stackwalker.
Please check that you are using the -g option when compiling the program (and not stripping the executable). Otherwise, it would be nice to know which gcc version you are using.