gpt4 book ai didi

c - Windbg 符号文件无法解析

转载 作者:行者123 更新时间:2023-11-30 17:00:38 30 4
gpt4 key购买 nike

我的可执行文件是 setup.exe,我在同一目录中有一个名为 setup.pdb 的 pdb 文件 c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1

我的符号文件路径是这样的

cache*c:\symbols;srv*https://msdl.microsoft.com/download/symbols;c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1

当我使用这个重新加载时

.reload /f 

我可以看到这个错误:

SYMSRV:  c:\symbols\image00000001`3f6b0000.dbg\574587D664000\image00000001`3f6b0000.dbg not found
SYMSRV: c:\symbols\image00000001`3f6b0000.dbg\574587D664000\image00000001`3f6b0000.dbg not found
SYMSRV: https://msdl.microsoft.com/download/symbols/image00000001`3f6b0000.dbg/574587D664000/image00000001`3f6b0000.dbg not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\image00000001`3f6b0000.dbg - file not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\.exe\image00000001`3f6b0000.dbg - path not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\symbols\.exe\image00000001`3f6b0000.dbg - path not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\setup.pdb\image00000001`3f6b0000.dbg - path not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\setup.pdb\.exe\image00000001`3f6b0000.dbg - path not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\setup.pdb\symbols\.exe\image00000001`3f6b0000.dbg - path not found
DBGHELP: C:\ADE\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\Disk1\install\image00000001`3f6b0000.dbg - file not found
DBGHELP: C:\ADE\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\Disk1\install\.exe\image00000001`3f6b0000.dbg - path not found
DBGHELP: C:\ADE\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\Disk1\install\symbols\.exe\image00000001`3f6b0000.dbg - path not found
DBGHELP: image00000001`3f6b0000 missing debug info. Searching for pdb anyway
DBGHELP: Can't use symbol server for image00000001`3f6b0000.pdb - no header information available
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\image00000001`3f6b0000.pdb - file not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\exe\image00000001`3f6b0000.pdb - file not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\symbols\exe\image00000001`3f6b0000.pdb - file not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\setup.pdb\image00000001`3f6b0000.pdb - file not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\setup.pdb\exe\image00000001`3f6b0000.pdb - file not found
DBGHELP: c:\ade\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\disk1\install\setup.pdb\symbols\exe\image00000001`3f6b0000.pdb - file not found
DBGHELP: C:\ADE\bpurana\.ade\view_storage\bpurana_oui_424\oui\cd\Disk1\install\image00000001`3f6b0000.pdb - file not found
DBGHELP: image00000001`3f6b0000.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for image00000001`3f6b0000

我想知道

  1. 当 pdb 已存在于路径中时,为什么还要查找 dbg 文件。
  2. 为什么有对 image00000001`3f6b0000.pdb 的引用; setup.pdb何时位于符号路径中?
  3. 此图像<>文件名是从哪里填充的?

编辑1:

编译使用的命令:

    icl.exe /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN64" /D "_DEBUG" /D   "_WINDOWS" /Fp".\win64\debug\setup.pch" /YX /Fo".\win64\debug\\" /Fd".\win64\debug\\" /c ..\c\runInstaller.c

编辑2:

这是我在 exe 文件上尝试 cdb 时看到的结果。它似乎有一个 image<> 可执行文件。

 C:\Program Files\Debugging Tools for Windows (x64)>cdb.exe -c "q" C:\ADE\bpurana_oui_win\oui\cd\Disk1\install\setup.exe  | grep -A 1 -i Execu*
Executable search path is:
ModLoad: 00007ff7`e4e10000 00007ff7`e4e74000 image00007ff7`e4e10000

ICL 版本是这样的:

[C:\ADE\bpurana_oui_win\oui]icl /version
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.4.237 Build 20140805

版权所有 (C) 1985-2014 英特尔公司。保留所有权利。

即使如此,问题仍然存在,我还需要解决其他问题吗?

最佳答案

包含单个 src 文件的目录

:\>ls -l
total 4
-rw-rw-rw- 1 HP 0 63 2016-05-27 13:51 hw.cpp

src是一个简单的hello orld

:\>cat hw.cpp
#include <stdio.h>
void main (void)
{
printf("hello");
}

使用调试信息编译

:\>cl /nologo /Zi /Fe:hwdbg.exe hw.cpp
hw.cpp

编译时没有调试信息

:\>cl /nologo /Fe:hwnodbg.exe hw.cpp
hw.cpp

在 Pe header 中转储 nodbg 和 dbg exe 的调试目录内容

:\>dumpbin /nologo /headers hwdbg.exe hwnodbg.exe | grep -i -A 4 Debug*
5A220 [ 38] RVA [size] of Debug Directory
xxxx

57480732 cv 38 0005B048 59C48 Format: RSDS, {2233DB57-2608-46AF-A94C-0AB233BB333C},
--
164B0 [ 1C] RVA [size] of Debug Directory
xxxxx

57480738 coffgrp 300 000165F4 159F4

在windbg中加载可执行文件并检查图像名称

:\>cdb.exe -c "q" hwdbg.exe | grep -A 1 -i Execu*
Executable search path is:
ModLoad: 01070000 010d5000 hwdbg.exe

:\>cdb.exe -c "q" hwnodbg.exe | grep -A 1 -i Execu*
Executable search path is:
ModLoad: 01320000 0133c000 image01320000

关于c - Windbg 符号文件无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37477318/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com