【问题标题】:C++ - Is there any command likes addr2line on WindowsC++ - 在 Windows 上是否有任何命令喜欢 addr2line
【发布时间】:2019-05-30 01:54:29
【问题描述】:

如果 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的命令。

【问题讨论】:

  • 您可以在visual studio或windbg中加载转储文件,只要pdb匹配那么它应该能够解析回您的代码和行

标签: c++ debugging crash addr2line


【解决方案1】:

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

ln TestGame.exe+0x1c0c9f1

【讨论】:

    猜你喜欢
    • 2017-03-21
    • 1970-01-01
    • 2017-09-06
    • 2023-02-08
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多