C++ - Windows 上有类似 addr2line 的命令吗

标签 c++ debugging crash addr2line

如果 Windows 应用程序在没有 pdb 的用户设备上崩溃,它将产生如下调用堆栈:

TestGame  0x000000003f790000 + 1c0c9f1 
TestGame  0x000000003f790000 + 4b8a97c 
TestGame  0x000000003f790000 + 4b8a4f1 
TestGame  0x000000003f790000 + 3608413 
TestGame  0x000000003f790000 + 3630e94 
TestGame  0x000000003f790000 + 413a33e 
TestGame  0x000000003f790000 + 4151d46 
TestGame  0x000000003f790000 + 149c9e6 
TestGame  0x000000003f790000 + 149cc90 
TestGame  0x000000003f790000 + 419cddd 
TestGame  0x000000003f790000 + 41ab698 
TestGame  0x000000003f790000 + 3a909df 
TestGame  0x000000003f790000 + 3a999ff 
TestGame  0x000000003f790000 + 38fd369 
TestGame  0x000000003f790000 + 338688  
TestGame  0x000000003f790000 + 34827c  
TestGame  0x000000003f790000 + 3482da  
TestGame  0x000000003f790000 + 355e16  
TestGame  0x000000003f790000 + 5169f2e 
kernel32      0x0000000076ec0000 + 159cd   
ntdll         0x0000000076fe0000 + 5383d   

但是我在开发设备上有.PDB 文件,所以我想通过.PDB 地址源行。我知道一个命令addr2line可以在Linux上通过.so文件寻址行,我想知道Windows上是否有类似addr2line的命令。

最佳答案

在windbg中打开TestGame.exe,您需要完全相同的二进制文件。中断执行。加载该版本的 .pdb。运行以下命令:

ln TestGame.exe+0x1c0c9f1

关于C++ - Windows 上有类似 addr2line 的命令吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54022914/

相关文章:

c++ - 以对象为参数调用成员函数

c++ - 如何获取/设置 CFB_Mode 加密对象的内部状态?

java - 带调试信息编译的 Java 程序不应该在生产系统中使用吗?

java - 应用服务器崩溃的主要原因

c# - 以 window 8/10 技术无延迟地完全实时截屏

java - 在 GWT super 开发模式下调试?

python - MySQL Workbench 开发者工具

swift - 为什么 Swift 中的倒排范围会在运行时而不是编译时崩溃

crash - 如何在 Windbg 中找到应用程序崩溃的根本原因?

c++ - 如何通过矩阵的上三角形压平循环?